Merge pull request #341 from gstacks13/fix_show_episode_season_0

Fix show.episode() not allowing season 0
This commit is contained in:
Hellowlol 2019-02-11 01:23:44 +01:00 committed by GitHub
commit b25d837421
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -357,7 +357,7 @@ class Show(Video):
if title:
key = '/library/metadata/%s/allLeaves' % self.ratingKey
return self.fetchItem(key, title__iexact=title)
elif season and episode:
elif season is not None and episode:
results = [i for i in self.episodes() if i.seasonNumber == season and i.index == episode]
if results:
return results[0]