Skip to content

Commit

Permalink
TVSeason: Use IdsMixin
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Jan 15, 2022
1 parent c04536b commit 2643789
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions trakt/tv.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ def seasons(self):
data = yield self.ext + '/seasons?extended=full'
self._seasons = []
for season in data:
extract_ids(season)
self._seasons.append(TVSeason(self.title,
season['number'], **season))
yield self._seasons
Expand Down Expand Up @@ -500,11 +499,11 @@ def __str__(self):
__repr__ = __str__


class TVSeason(object):
class TVSeason(IdsMixin):
"""Container for TV Seasons"""

def __init__(self, show, season=1, slug=None, **kwargs):
super(TVSeason, self).__init__()
super().__init__()
self.show = show
self.season = season
self.slug = slug or slugify(show)
Expand Down
1 change: 0 additions & 1 deletion trakt/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ def get_items(self):
item_data['slug']))
elif item_type == 'season':
show_data = item.pop('show')
extract_ids(show_data)
season = TVSeason(show_data['title'], item_data['number'],
show_data['slug'])
self._items.append(season)
Expand Down

0 comments on commit 2643789

Please sign in to comment.