Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildFileInfo ¶
func BuildFileInfo(ctx context.Context, files <-chan filesystem.DirEntry) <-chan *FileInfo
BuildFileInfo reads from the given channel of filesystem.DirEntry objects, groups presence info for .mkv, .nfo, and .tcprofile files together, and produces a channel of FileInfo objects.
Types ¶
type DirKind ¶ added in v0.3.1
type DirKind int
DirKind is an enum used to represent the type of video files in a given directory: either a movie or a tv show. DirKind implements the json.Marshaler and json.Unmarshaler interfaces, so human-readable names will be used when serializing to JSON.
func GetDirKind ¶ added in v0.3.1
Examines metadata under dir to determine if it is a movie or a TV show.
func (DirKind) MarshalJSON ¶ added in v0.3.2
func (*DirKind) UnmarshalJSON ¶ added in v0.3.2
type FileInfo ¶
FileInfo contains information about .mkv file that exists on-disk, as well as the presence of related .nfo and .tcprofile files.
type Paths ¶
type Paths struct {
// contains filtered or unexported fields
}
Paths is used to convert between different file types. See the NewPathsFrom* functions.
func NewPathsFromMkv ¶
Returns an instance of the Paths type based on the given .mkv file path.
func NewPathsFromNfo ¶
Returns an instance of the Paths type based on the given .nfo file path.
func NewPathsFromTcProfile ¶
Returns an instance of the Paths type based on the given .tcprofile file path.