mediacheck

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mediacheck rejects video files that hold no data.

An incomplete download can leave a file with the right name and size whose bytes are all zero: the client preallocated it and never wrote the pieces. Recorded as an episode file, it marks the episode as "have file" forever, so nothing re-downloads it. Import and the library scan call Check before recording a file.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoData = errors.New("file contains no data (empty, or all zeros: an incomplete download?)")

ErrNoData is returned for a file that is empty or whose sampled bytes are all zero.

Functions

func Check

func Check(path string) error

Check reads a few small chunks spread across path and returns ErrNoData when every one of them is zero (or the file is empty). Any real video container has non-zero bytes in its header, so a healthy file passes on the first read. A partially downloaded file with some pieces written passes too: Check only catches files with no data at all.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL