media: add support for legacy tvdb api (#16)

This commit is contained in:
l3uddz
2021-02-19 23:31:23 +00:00
committed by GitHub
parent 5b179ed8dc
commit e5bcb5b381
8 changed files with 160 additions and 7 deletions

View File

@@ -49,5 +49,15 @@ func (c *Client) GetShowInfo(item *FeedItem) (*Item, error) {
mi.Omdb = *oi
}
// tvdb
if ti, err := c.tvdb.GetItem(strconv.Itoa(t.Ids.Tvdb)); err != nil {
c.log.Debug().
Err(err).
Int("tvdb_id", t.Ids.Tvdb).
Msg("Item was not found on tvdb")
} else if ti != nil {
mi.Tvdb = *ti
}
return mi, nil
}