Update system tray icon

This commit is contained in:
JonnyWong16 2020-04-25 18:32:10 -07:00
parent 00c9fc79f9
commit cd5ed1d748
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
5 changed files with 39 additions and 32 deletions

View file

@ -168,14 +168,9 @@ def check_update(scheduler=False, notify=False):
plexpy.UPDATE_AVAILABLE = False
if plexpy.WIN_SYS_TRAY_ICON:
image_dir = os.path.join(plexpy.PROG_DIR, 'data/interfaces/', plexpy.CONFIG.INTERFACE, 'images')
if plexpy.UPDATE_AVAILABLE:
icon = os.path.join(image_dir, 'logo-circle-update.ico')
hover_text = common.PRODUCT + ' - Update Available!'
else:
icon = os.path.join(image_dir, 'logo-circle.ico')
hover_text = common.PRODUCT + ' - No Update Available'
plexpy.WIN_SYS_TRAY_ICON.update(icon=icon, hover_text=hover_text)
plexpy.WIN_SYS_TRAY_ICON.change_tray_update_icon()
elif plexpy.MAC_SYS_TRAY_ICON:
plexpy.MAC_SYS_TRAY_ICON.change_tray_update_icon()
def check_github(scheduler=False, notify=False):