mirror of
https://github.com/spaam/svtplay-dl.git
synced 2024-11-24 12:15:40 +01:00
Barnkanal have started missing season number for some shows, now defaults to "01" if episode number exist.
This commit is contained in:
parent
171bd25084
commit
c86c111931
@ -259,14 +259,19 @@ class Svtplay(Service, MetadataThumbMixin):
|
|||||||
self.output["episodename"] = other
|
self.output["episodename"] = other
|
||||||
|
|
||||||
def seasoninfo(self, data):
|
def seasoninfo(self, data):
|
||||||
|
season, episode = None, None
|
||||||
if "season" in data and data["season"]:
|
if "season" in data and data["season"]:
|
||||||
season = "{:02d}".format(data["season"])
|
season = "{:02d}".format(data["season"])
|
||||||
|
if int(season) == 0:
|
||||||
|
season = None
|
||||||
|
if "episodeNumber" in data and data["episodeNumber"]:
|
||||||
episode = "{:02d}".format(data["episodeNumber"])
|
episode = "{:02d}".format(data["episodeNumber"])
|
||||||
if int(season) == 0 and int(episode) == 0:
|
if int(episode) == 0:
|
||||||
return None, None
|
episode = None
|
||||||
return season, episode
|
if episode is not None and season is None:
|
||||||
else:
|
# Missing season, happens for some barnkanalen shows assume first and only
|
||||||
return None, None
|
season = "01"
|
||||||
|
return season, episode
|
||||||
|
|
||||||
def extrametadata(self, data):
|
def extrametadata(self, data):
|
||||||
self.output["tvshow"] = (self.output["season"] is not None and
|
self.output["tvshow"] = (self.output["season"] is not None and
|
||||||
|
Loading…
Reference in New Issue
Block a user