Update subgen.py

Fixed UnboundLocalError: cannot access local variable 'jellyfin_userid' where it is not associated with a value
This commit is contained in:
McCloudS
2023-10-25 23:59:20 -06:00
committed by GitHub
parent a6bd06249e
commit 715cd279e6

View File

@@ -280,6 +280,7 @@ def get_jellyfin_file_name(item_id: str, jellyfin_url: str, jellyfin_token: str)
}
# Cheap way to get the admin user id, and save it for later use.
global jellyfin_userid
if not jellyfin_userid:
users_request = json.loads(requests.get(f"{jellyfin_url}/Users", headers=headers).content)
for user in users_request: