mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-26 13:40:22 +00:00
Merge pull request #343 from gstacks13/get_season_from_index
Get season from index instead of creating title
This commit is contained in:
commit
49d6314426
1 changed files with 2 additions and 2 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue