glensc / python-pytrakt

A Pythonic interface to the Trakt.tv REST API
https://glensc.github.io/python-pytrakt/
Other
22 stars 7 forks source link

add show_id to TVEpisode #6

Closed simonc56 closed 2 years ago

simonc56 commented 2 years ago

follow dece4d0a1b453412f9e7f92a938232487977bffd

Actually, to get the show of a TVEpisode we only have show name (self.show) which is not reliable because some shows have the same name. The show trakt id is more reliable than show name because it is unique. This PR adds show_id attribute to TVEpisode.

Example : Top Boy and Top Boy 2019 A TVEpisode from Top Boy 2019 uses slug top-boy (made from slugify(self.show) ) instead of top-boy-2019 to fetch data from trakt api. Therefore data received is wrong.

glensc commented 2 years ago

Released with 3.4.9

glensc commented 1 year ago

The initializer for TVEpisode.show_id was not added.

glensc commented 1 year ago

yet adding it as def __init__(self, show, season, number=-1, show_id=None, **kwargs): triggers this._get rather this._build: