Skip to content

Commit

Permalink
Catch invalid JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamWHY2K committed Oct 13, 2023
1 parent 3ba78cd commit 7e56910
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Binary file modified @Resources/Jellyfin_Status.exe
Binary file not shown.
7 changes: 7 additions & 0 deletions @Resources/Jellyfin_Status.pyw
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ class App():
self.write_error()
sleep(300)
self.connect()
except ValueError:
logging.error("\t\t\t JSON recieved from the API is invalid.")
logging.info("Retrying in 5 minutes.")
self.write_error()
sleep(300)
self.connect()


def write_error(self):
with open("py_out.txt", "wb") as f:
Expand Down

0 comments on commit 7e56910

Please sign in to comment.