mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Fix start/end air compute when no episodes exists in season
This commit is contained in:
parent
d0a7d5766e
commit
13e7d87134
@ -411,8 +411,22 @@ class TVDB(Provider):
|
||||
return Season(
|
||||
season_number=info["data"]["number"],
|
||||
episodes_count=len(info["data"]["episodes"]),
|
||||
start_air=min(x["aired"] for x in info["data"]["episodes"]),
|
||||
end_air=max(x["aired"] for x in info["data"]["episodes"]),
|
||||
start_air=min(
|
||||
(
|
||||
x["aired"]
|
||||
for x in info["data"]["episodes"]
|
||||
if x["aired"] is not None
|
||||
),
|
||||
default=None,
|
||||
),
|
||||
end_air=max(
|
||||
(
|
||||
x["aired"]
|
||||
for x in info["data"]["episodes"]
|
||||
if x["aired"] is not None
|
||||
),
|
||||
default=None,
|
||||
),
|
||||
external_id={
|
||||
self.name: MetadataID(season_id, None),
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user