Skip to content

Commit

Permalink
Update to 1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamWHY2K committed Mar 18, 2023
1 parent 8fe9576 commit eefab5a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
Binary file modified @Resources/Jellyfin_Status.exe
Binary file not shown.
15 changes: 13 additions & 2 deletions @Resources/Jellyfin_Status.pyw
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ class App():
for i in dict(sorted(self.users.items())): #Sorted so it prints in a consistent order
f.write(self.users[i].output.encode("ascii", errors='replace')) #Rainmeter really doesn't like chars that aren't in the basic 128 ascii range, incompatible chars will be replaced with a ?

if __name__ == "__main__":
def check_for_updates():
#Check for updates, doing this outside of the main program so it only checks once per load; instead of every 60 seconds.
JF_Status_github = requests.get("https://api.github.com/repos/AdamWHY2K/Rainmeter_Jellyfin_Status/releases")
current_version = "1.0.3"
current_version = "1.0.4"
try:
latest_version = JF_Status_github.json()[0]["tag_name"][1:]
changelog = JF_Status_github.json()[0]["body"]
Expand All @@ -106,6 +106,17 @@ if __name__ == "__main__":
else:
pass #User has latest version installed

def check_for_multiple_processes():
count_processes = 0
for i in WMI().Win32_Process(name="Jellyfin_Status.exe"):
count_processes += 1
if count_processes > 2:
logging.debug("Exiting due to program already running.")
raise SystemExit

if __name__ == "__main__":
check_for_multiple_processes()
check_for_updates()
while WMI().Win32_Process(name="Rainmeter.exe"): #While the Rainmeter process exists
try:
myApp = App(sys.argv[1], sys.argv[2])
Expand Down
2 changes: 1 addition & 1 deletion Jellyfin_Status.ini
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ DynamicVariables=1

[WidthSizer]
Measure=Calc
Formula=(Max([Line1:W], Max([Line2:W], Max([Line3:W], Max([Line4:W], [Line5:W])))))
Formula=(Max([Line1:W], Max([Line2:W], Max([Line3:W], Max([Line4:W], Max([Line5:W], [Title:W]))))))
DynamicVariables=1

[Title]
Expand Down

0 comments on commit eefab5a

Please sign in to comment.