Safety check
This commit is contained in:
parent
571a12d329
commit
b48f2a1eff
@ -200,13 +200,15 @@ class Status(commands.Cog):
|
|||||||
session.commit()
|
session.commit()
|
||||||
|
|
||||||
# If series and only a portion of episodes have been downloaded
|
# If series and only a portion of episodes have been downloaded
|
||||||
if data.get("statistics").get("percentOfEpisodes"):
|
# If data["statistics"] exists and is not None
|
||||||
description += (
|
if "statistics" in data and data["statistics"] != None:
|
||||||
f"\n**{title} ({release_year})** - Status: `NOT"
|
if "percentOfEpisodes" in data["statistics"]:
|
||||||
" FOUND"
|
description += (
|
||||||
f" ({int(data['statistics']['percentOfEpisodes'])}%"
|
f"\n**{title} ({release_year})** - Status: `NOT"
|
||||||
" of eps.)`"
|
" FOUND"
|
||||||
)
|
f" ({int(data['statistics']['percentOfEpisodes'])}%"
|
||||||
|
" of eps.)`"
|
||||||
|
)
|
||||||
# All other scenarios, download not found
|
# All other scenarios, download not found
|
||||||
else:
|
else:
|
||||||
description += (
|
description += (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user