Add update check to Windows tray icon

This commit is contained in:
JonnyWong16 2018-08-18 15:30:59 -07:00
parent 5d82ed9415
commit 84ef02aa03
7 changed files with 76 additions and 15 deletions

View file

@ -145,6 +145,15 @@ def check_update(auto_update=False, notify=False):
else:
plexpy.UPDATE_AVAILABLE = False
if plexpy.WIN_SYS_TRAY_ICON:
if plexpy.UPDATE_AVAILABLE:
icon = os.path.join(plexpy.PROG_DIR, 'data/interfaces/', plexpy.CONFIG.INTERFACE, 'images/logo-update.ico')
hover_text = common.PRODUCT + ' - Update Available!'
else:
icon = os.path.join(plexpy.PROG_DIR, 'data/interfaces/', plexpy.CONFIG.INTERFACE, 'images/logo.ico')
hover_text = common.PRODUCT + ' - No Update Available'
plexpy.WIN_SYS_TRAY_ICON.update(icon=icon, hover_text=hover_text)
def check_github(auto_update=False, notify=False):
plexpy.COMMITS_BEHIND = 0