Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileNameCleaner ¶
FileNameCleaner return a safe file name from a given show name.
func Format2Digits ¶
Format2Digits return a number with 2 digits when there is only one digit
func PathNameCleaner ¶
PathNameCleaner return a safe path name from a given show name.
Types ¶
type Media ¶ added in v0.7.0
type Media struct { ID string // Show ID ShowType ShowType // Movie or Series? Metadata MetaDataHandler // Carry metadata scrapped online Match *matcher.MatchRequest // Matched request ShowPath string // Path of the show/media }
Media represents a media to be handled.
func (*Media) SetMetaData ¶ added in v0.7.0
func (m *Media) SetMetaData(info MetaDataHandler)
type MetaDataHandler ¶ added in v0.7.0
type MetaDataHandler interface { GetMediaInfo() *nfo.MediaInfo // return a pointer to MediaInfo struct GetMediaPath(showPath string) string // Returns mp4 path as showPath/.../file.mp4 GetMediaPathMatcher(showPath string) string // Returns a name matcher for mis numbered episodes GetNFOPath(showPath string) string // Returns nfo path as showPath/.../file.nfo WriteNFO(showPath string) error // Write nfo file showPath/.../file.nfo Accepted(m *matcher.MatchRequest) bool // TODO check if this is the right place ofr this }
MetaDataHandler represents a struct for managing media's metadata
type Provider ¶
type Provider interface { Configure(c Config) // Pass general configuration Name() string // Provider's name MediaList(context.Context, []*matcher.MatchRequest) chan *Media // List of available shows that match one of MatchRequest GetMediaDetails(context.Context, *Media) error // Download more details when available }
Provider is the interface for a provider
Click to show internal directories.
Click to hide internal directories.