Documentation ¶
Index ¶
- func FileNameCleaner(s string) string
- func Format2Digits(d string) string
- func PathNameCleaner(s string) string
- type Actor
- type Aired
- type EpisodeDetails
- func (n *EpisodeDetails) GetMediaInfo() *MediaInfo
- func (n EpisodeDetails) GetMediaPath(destination string) string
- func (n EpisodeDetails) GetMediaPathMatcher(destination string) string
- func (n EpisodeDetails) GetNFOPath(destination string) string
- func (n EpisodeDetails) GetSeasonNFOPath(destination string) string
- func (n *EpisodeDetails) GetSeasonPath(destination string) string
- func (n EpisodeDetails) GetSeriesPath(destination string) string
- func (n EpisodeDetails) GetShowNFOPath(destination string) string
- func (n *EpisodeDetails) WriteNFO(destination string) error
- type ID
- type MediaInfo
- type Movie
- func (n *Movie) GetMediaInfo() *MediaInfo
- func (n Movie) GetMediaPath(destination string) string
- func (n Movie) GetMediaPathMatcher(destination string) string
- func (n Movie) GetNFOPath(destination string) string
- func (n Movie) GetSeasonNFOPath(destination string) string
- func (n Movie) GetSeasonPath(destination string) string
- func (n Movie) GetSeriesPath(destination string) string
- func (n Movie) GetShowNFOPath(destination string) string
- func (n *Movie) WriteNFO(destination string) error
- type Season
- type TVShow
- type Thumb
- type ThumbLevel
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 Actor ¶
type Actor struct { Name string `xml:"name,omitempty"` Role string `xml:"role,omitempty"` Order string `xml:"order,omitempty"` Type string `xml:"type,omitempty"` Thumb string `xml:"thumb,omitempty"` }
Actor describe actors
type Aired ¶
Aired type helper
func (Aired) MarshalText ¶
MarshalText write Aired correctly
func (*Aired) UnmarshalText ¶
UnmarshalText grab aired field and turn it into time
type EpisodeDetails ¶
EpisodeDetails gives details of a given episode
func (*EpisodeDetails) GetMediaInfo ¶
func (n *EpisodeDetails) GetMediaInfo() *MediaInfo
GetMediaInfo return a pointer to MediaInfo struct
func (EpisodeDetails) GetMediaPath ¶
func (n EpisodeDetails) GetMediaPath(destination string) string
GetMediaPath gives the full filename of given media
func (EpisodeDetails) GetMediaPathMatcher ¶
func (n EpisodeDetails) GetMediaPathMatcher(destination string) string
GetMediaPathMatcher gives a name matcher for mis numbered episodes
func (EpisodeDetails) GetNFOPath ¶
func (n EpisodeDetails) GetNFOPath(destination string) string
GetNFOPath give the path where the episode's NFO should be
func (EpisodeDetails) GetSeasonNFOPath ¶
func (n EpisodeDetails) GetSeasonNFOPath(destination string) string
GetShowNFOPath returns the path for TVShow.nfo
func (*EpisodeDetails) GetSeasonPath ¶
func (n *EpisodeDetails) GetSeasonPath(destination string) string
GetSeasonPath give the path for the series' season
func (EpisodeDetails) GetSeriesPath ¶
func (n EpisodeDetails) GetSeriesPath(destination string) string
GetSeriesPath gives path for the whole series
func (EpisodeDetails) GetShowNFOPath ¶
func (n EpisodeDetails) GetShowNFOPath(destination string) string
GetShowNFOPath returns the path for TVShow.nfo
func (*EpisodeDetails) WriteNFO ¶
func (n *EpisodeDetails) WriteNFO(destination string) error
WriteNFO file at expected place
type ID ¶
type ID struct { ID string `xml:",chardata"` Type string `xml:"type,attr,omitempty"` Default string `xml:"default,attr,omitempty"` }
ID for Shows / Episode
type MediaInfo ¶
type MediaInfo struct { Title string `xml:"title,omitempty"` Showtitle string `xml:"showtitle,omitempty"` Season int `xml:"season,omitempty"` Episode int `xml:"episode,omitempty"` DisplaySeason int `xml:"displayseason,omitempty"` DisplayEpisode int `xml:"displayepisode,omitempty"` Plot string `xml:"plot,omitempty"` Thumb []Thumb `xml:"-"` UniqueID []ID `xml:"uniqueid,omitempty"` Genre []string `xml:"genre,omitempty"` Credits []string `xml:"credits,omitempty"` Director []string `xml:"director,omitempty"` Aired Aired `xml:"aired,omitempty"` Studio string `xml:"studio,omitempty"` Actor []Actor `xml:"actor,omitempty"` Tag []string `xml:"tag,omitempty"` URL string `xml:"-"` // Media URL IsSpecial bool `xml:"-"` // True when special episode SeasonInfo *Season `xml:"-"` // Possible Season nfo TVShow *TVShow `xml:"-"` // Possible TVShow nfo }
MediaInfo is the shared part of metadata
type Movie ¶
Movie holds metadata for movies
func (*Movie) GetMediaInfo ¶
GetMediaInfo return a pointer to MediaInfo struct
func (Movie) GetMediaPath ¶
GetMediaPath returns the media path
func (Movie) GetMediaPathMatcher ¶
func (Movie) GetNFOPath ¶
GetNFOPath give the path where the episode's NFO should be
func (Movie) GetSeasonNFOPath ¶
GetSeasonNFOPath returns the path for TVShow.nfo
func (Movie) GetSeasonPath ¶
GetSeasonPath give the path for the series' season
func (Movie) GetSeriesPath ¶
GetSeriesPath gives path for the whole series
func (Movie) GetShowNFOPath ¶
GetShowNFOPath returns the path for TVShow.nfo
type Season ¶
type Season struct { XMLName xml.Name `xml:"season"` Plot string `xml:"plot,omitempty"` Outline string `xml:"outline,omitempty"` Lockdata string `xml:"lockdata,omitempty"` Dateadded string `xml:"dateadded,omitempty"` Title string `xml:"title,omitempty"` Year string `xml:"year,omitempty"` Aired Aired `xml:"premiered,omitempty"` Seasonnumber string `xml:"seasonnumber,omitempty"` Thumb []Thumb `xml:"-"` }
type TVShow ¶
type TVShow struct { XMLName xml.Name `xml:"tvshow"` Title string `xml:"title,omitempty"` OriginalTitle string `xml:"originaltitle,omitempty"` Plot string `xml:"plot,omitempty"` Userrating string `xml:"userrating,omitempty"` MPAA string `xml:"mpaa,omitempty"` UniqueID []ID `xml:"uniqueid,omitempty"` Genre []string `xml:"genre,omitempty"` Studio string `xml:"studio,omitempty"` Actor []Actor `xml:"actor,omitempty"` Thumb []Thumb `xml:"-"` HasEpisodes bool `xml:"-"` // True when the show has defined episodes }
TVShow description named tvshow.nfo
func (TVShow) GetNFOPath ¶
GetNFOPath returns the path for TVShow.nfo