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 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) WriteNFO ¶
func (n *EpisodeDetails) WriteNFO(destination string) error
WriteNFO file at expected place TODO remove destination and get it from show path
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"` MediaURL string `xml:"-"` // Media URL mp4 PageURL string `xml:"-"` // Show page url IsSpecial bool `xml:"-"` // True when special episode SeasonInfo *Season `xml:"-"` // Possible Season nfo TVShow *TVShow `xml:"-"` // Possible TVShow nfo IsDetailed bool `xml:"-"` // True when details have been retrieved IsBonus bool `xml:"-"` // True when the media is a bonus or a teaser MediaType ShowType }
MediaInfo is the shared part of metadata
type Movie ¶
Movie holds metadata for movies
func (*Movie) GetMediaInfo ¶
GetMediaInfo return a pointer to MediaInfo struct
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 ShowType ¶ added in v0.14.0
type ShowType int
ShowType says if the media is a movie (one time broadcast), Show (recurring show) or a series (with seasons and episodes)
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