Documentation
¶
Index ¶
- func IsSample(m types.Media) bool
- func New(path string) (types.LocalMedia, error)
- func NewLocalSubtitle(file os.FileInfo) (types.Subtitle, error)
- func NewMetadata(str string) (types.Metadata, error)
- type EpisodeMeta
- func (e *EpisodeMeta) Episode() int
- func (e *EpisodeMeta) MarshalJSON() (b []byte, err error)
- func (e *EpisodeMeta) Matches(types.Subtitle) bool
- func (e *EpisodeMeta) Score(types.Subtitle) float32
- func (e *EpisodeMeta) Season() int
- func (e *EpisodeMeta) String() string
- func (e *EpisodeMeta) TVShow() string
- type File
- type FilePath
- type LocalSubtitle
- func (l *LocalSubtitle) Download() (io.ReadCloser, error)
- func (l *LocalSubtitle) IsHI() bool
- func (l *LocalSubtitle) IsLang(tag language.Tag) bool
- func (l *LocalSubtitle) Language() language.Tag
- func (l *LocalSubtitle) MarshalJSON() (b []byte, err error)
- func (l *LocalSubtitle) Meta() types.Metadata
- func (l *LocalSubtitle) String() string
- func (l *LocalSubtitle) TypeEpisode() (types.Episode, bool)
- func (l *LocalSubtitle) TypeMovie() (types.Movie, bool)
- type Metadata
- type MovieMeta
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EpisodeMeta ¶
type EpisodeMeta struct {
Metadata
// contains filtered or unexported fields
}
EpisodeMeta represents an episode from a TV show
func NewEpisode ¶
func NewEpisode(filename string) (*EpisodeMeta, error)
NewEpisode parses media info from a file
func (*EpisodeMeta) Episode ¶
func (e *EpisodeMeta) Episode() int
Episode is the episode number in the season
func (*EpisodeMeta) MarshalJSON ¶
func (e *EpisodeMeta) MarshalJSON() (b []byte, err error)
func (*EpisodeMeta) Matches ¶
func (e *EpisodeMeta) Matches(types.Subtitle) bool
Matches an episode against a subtitle
func (*EpisodeMeta) Score ¶
func (e *EpisodeMeta) Score(types.Subtitle) float32
Score returns the likelyhood of the subtitle maching the episode
func (*EpisodeMeta) Season ¶
func (e *EpisodeMeta) Season() int
Season is the season number of the show
func (*EpisodeMeta) String ¶
func (e *EpisodeMeta) String() string
func (*EpisodeMeta) TVShow ¶
func (e *EpisodeMeta) TVShow() string
TVShow is the name of the TV show
type File ¶
func (*File) ExistingSubtitles ¶
func (f *File) ExistingSubtitles() (types.SubtitleList, error)
func (*File) MarshalJSON ¶
func (*File) SaveSubtitle ¶
func (f *File) SaveSubtitle(s types.Downloadable, lang language.Tag) (types.LocalSubtitle, error)
SaveSubtitle saves the subtitle for the given media to disk
type FilePath ¶ added in v0.2.0
type FilePath string
FilePath is a string describing a path to a file
type LocalSubtitle ¶
func (*LocalSubtitle) Download ¶
func (l *LocalSubtitle) Download() (io.ReadCloser, error)
func (*LocalSubtitle) IsHI ¶
func (l *LocalSubtitle) IsHI() bool
func (*LocalSubtitle) Language ¶
func (l *LocalSubtitle) Language() language.Tag
func (*LocalSubtitle) MarshalJSON ¶
func (l *LocalSubtitle) MarshalJSON() (b []byte, err error)
func (*LocalSubtitle) Meta ¶
func (l *LocalSubtitle) Meta() types.Metadata
func (*LocalSubtitle) String ¶
func (l *LocalSubtitle) String() string
func (*LocalSubtitle) TypeEpisode ¶
func (l *LocalSubtitle) TypeEpisode() (types.Episode, bool)
type Metadata ¶
type Metadata struct {
// contains filtered or unexported fields
}
Metadata provides release information for media
func ParseMetadata ¶
ParseMetadata generates meta data from a string
func (Metadata) MarshalJSON ¶
type MovieMeta ¶
type MovieMeta struct {
Metadata
// contains filtered or unexported fields
}
MovieMeta represents a movie file
func (*MovieMeta) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.