1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 21:54:17 +01:00

tv4play: in some cases we dont have episode info

This commit is contained in:
Johan Andersson 2017-05-01 22:04:57 +02:00
parent 72eddeb470
commit bccfc1fa3a

View File

@ -168,10 +168,13 @@ class Tv4play(Service, OpenGraphThumbMixin):
def _seasoninfo(self, data):
if "season" in data and data["season"]:
season = "{:02d}".format(data["season"])
episode = "{:02d}".format(data["episode"])
if int(season) == 0 and int(episode) == 0:
return None
return "s%se%s" % (season, episode)
if "episode" in data:
episode = "{:02d}".format(data["episode"])
if int(season) == 0 and int(episode) == 0:
return None
return "s%se%s" % (season, episode)
else:
return "s%s" % season
else:
return None