Author: Adam <git@apiote.tk>
show end year in cancelled TV series
datastructure/tvqueue.go | 2 +- tmdb/serie.go | 2 +-
diff --git a/datastructure/tvqueue.go b/datastructure/tvqueue.go index 33104c0163bb6bf9ced05533192cb3e6f9583e9d..53a88961c7d51443a26e808e6c77a05d8432f8be 100644 --- a/datastructure/tvqueue.go +++ b/datastructure/tvqueue.go @@ -14,7 +14,7 @@ func (e TvQueueEntry) GetYears() string { if e.YearStart == 0 { return "" - } else if e.Status == "Ended" { + } else if e.Status == "Ended" || e.Status == "Canceled" { if e.YearEnd == e.YearStart { return strconv.FormatInt(int64(e.YearStart), 10) } else { diff --git a/tmdb/serie.go b/tmdb/serie.go index c196e66ce9aa4994b63cc563bf33336d5dd576e0..f223662c12d02ee01b20e9dc5cf2f67cbc346fcc 100644 --- a/tmdb/serie.go +++ b/tmdb/serie.go @@ -125,7 +125,7 @@ func (s TvSerie) GetYears() string { if s.First_air_date.IsZero() { return "" - } else if s.Status == "Ended" { + } else if s.Status == "Ended" || s.Status == "Canceled" { if s.Last_air_date.Year() == s.First_air_date.Year() { return strconv.FormatInt(int64(s.First_air_date.Year()), 10) } else {