-
Notifications
You must be signed in to change notification settings - Fork 3
/
episode.go
42 lines (40 loc) · 1.76 KB
/
episode.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package tvdb
// Episode struct store all data of an episode.
type Episode struct {
AbsoluteNumber int `json:"absoluteNumber"`
AiredEpisodeNumber int `json:"airedEpisodeNumber"`
AiredSeason int `json:"airedSeason"`
AirsAfterSeason int `json:"airsAfterSeason"`
AirsBeforeEpisode int `json:"airsBeforeEpisode"`
AirsBeforeSeason int `json:"airsBeforeSeason"`
Director string `json:"director"`
Directors []string `json:"directors"`
DvdChapter int `json:"dvdChapter"`
DvdDiscid string `json:"dvdDiscid"`
DvdEpisodeNumber float64 `json:"dvdEpisodeNumber"`
DvdSeason int `json:"dvdSeason"`
EpisodeName string `json:"episodeName"`
Filename string `json:"filename"`
FirstAired string `json:"firstAired"`
GuestStars []string `json:"guestStars"`
ID int `json:"id"`
ImdbID string `json:"imdbId"`
LastUpdated int `json:"lastUpdated"`
LastUpdatedBy int `json:"lastUpdatedBy"`
Overview string `json:"overview"`
ProductionCode string `json:"productionCode"`
SeriesID int `json:"seriesId"`
ShowURL string `json:"showURL"`
SiteRating float32 `json:"siteRating"`
SiteRatingCount int `json:"siteRatingCount"`
ThumbAdded string `json:"thumbAdded"`
ThumbAuthor int `json:"thumbAuthor"`
ThumbHeight string `json:"thumbHeight"`
ThumbWidth string `json:"thumbWidth"`
Writers []string `json:"writers"`
}
// Empty verify if the episode's fields are empty and don't are filled by an api
// response.
func (e *Episode) Empty() bool {
return e.ID == 0 && e.EpisodeName == ""
}