Safety check

This commit is contained in:
Parker M. 2025-01-22 16:03:57 -06:00
parent 571a12d329
commit b48f2a1eff
Signed by: parker
GPG Key ID: 505ED36FC12B5D5E

@ -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 += (