Merge pull request #343 from gstacks13/get_season_from_index

Get season from index instead of creating title
This commit is contained in:
Hellowlol 2019-02-21 19:50:56 +01:00 committed by GitHub
commit 49d6314426
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -332,9 +332,9 @@ class Show(Video):
Parameters:
title (str or int): Title or Number of the season to return.
"""
if isinstance(title, int):
title = 'Season %s' % title if title != 0 else 'Specials'
key = '/library/metadata/%s/children' % self.ratingKey
if isinstance(title, int):
return self.fetchItem(key, etag='Directory', index__iexact=str(title))
return self.fetchItem(key, etag='Directory', title__iexact=title)
def episodes(self, **kwargs):