Add KeyboardInterrupt handling
This commit is contained in:
5
main.py
5
main.py
@@ -204,5 +204,8 @@ if __name__ == "__main__":
|
||||
logger(traceback.format_exc(), 2)
|
||||
logger("Retrying in {sleep_timer}", log_type=0)
|
||||
|
||||
|
||||
except KeyboardInterrupt:
|
||||
logger("Exiting", log_type=0)
|
||||
os._exit(0)
|
||||
|
||||
sleep(sleep_timer)
|
||||
@@ -150,6 +150,7 @@ class Jellyfin():
|
||||
if jellyfin_library["Name"] == library:
|
||||
library_id = jellyfin_library["Id"]
|
||||
break
|
||||
|
||||
if library_id:
|
||||
library_search = self.query(f"/Users/{user_id}/Items?SortBy=SortName&SortOrder=Ascending&Recursive=true&ParentId={library_id}&limit=1", "get")
|
||||
library_type = library_search["Items"][0]["Type"]
|
||||
|
||||
Reference in New Issue
Block a user