minimal cleanup for agesrestricted variable

This commit is contained in:
bassdart 2025-02-23 17:43:29 +01:00
parent 34d448ae1f
commit 8b3187e33f

View file

@ -737,25 +737,25 @@ def resolveprovider(entry):
):
provider = str(entry["sources"][0]["provider"])
videoid = str(entry["sources"][0]["videoid"])
restricted = int(entry["sources"][0]["age_limit"])
agerestricted = int(entry["sources"][0]["age_limit"])
video_url = str(entry["sources"][0]["video_url"])
elif entry["sources"][1]["provider"] == preferedprovider:
provider = str(entry["sources"][1]["provider"])
videoid = str(entry["sources"][1]["videoid"])
restricted = int(entry["sources"][1]["age_limit"])
agerestricted = int(entry["sources"][1]["age_limit"])
video_url = str(entry["sources"][1]["video_url"])
else:
provider = str(entry["sources"][0]["provider"])
videoid = str(entry["sources"][0]["videoid"])
restricted = int(entry["sources"][0]["age_limit"])
agerestricted = int(entry["sources"][0]["age_limit"])
video_url = str(entry["sources"][0]["video_url"])
else:
# we should never end up here?
provider = str(entry["sources"][0]["provider"])
videoid = str(entry["sources"][0]["videoid"])
agerestricted = int(entry["sources"][0]["age_limit"])
video_url = str(entry["sources"][0]["video_url"])
agerestricted = 0
agerestricted = int(entry["sources"][0]["age_limit"])
slug = str(entry["slug"])
addonyoutube = addon.getSetting("addon-youtube")
addonyoutubeagerestricted = addon.getSetting("addon-youtube-age-restricted")