diff --git a/headphones/__init__.py b/headphones/__init__.py index ebc69ccf..2827ba2a 100644 --- a/headphones/__init__.py +++ b/headphones/__init__.py @@ -138,7 +138,7 @@ def initialize(): global __INITIALIZED__, FULL_PATH, PROG_DIR, QUIET, DAEMON, DATA_DIR, CONFIG_FILE, CFG, LOG_DIR, \ HTTP_PORT, HTTP_HOST, HTTP_USERNAME, HTTP_PASSWORD, HTTP_ROOT, LAUNCH_BROWSER, GIT_PATH, \ - CURRENT_VERSION, \ + CURRENT_VERSION, LATEST_VERSION,\ MUSIC_DIR, PREFER_LOSSLESS, FLAC_TO_MP3, MOVE_FILES, RENAME_FILES, FOLDER_FORMAT, \ FILE_FORMAT, CLEANUP_FILES, ADD_ALBUM_ART, DOWNLOAD_DIR, BLACKHOLE, BLACKHOLE_DIR, USENET_RETENTION, \ NZB_SEARCH_INTERVAL, LIBRARYSCAN_INTERVAL, \ @@ -230,6 +230,9 @@ def initialize(): # Get the currently installed version - returns None, 'win32' or the git hash # Also sets INSTALL_TYPE variable to 'win', 'git' or 'source' CURRENT_VERSION = versioncheck.getVersion() + + # Check for new versions + LATEST_VERSION = versioncheck.checkGithub() __INITIALIZED__ = True return True @@ -360,9 +363,6 @@ def start(): SCHED.start() - # Check for new versions - versioncheck.checkGithub() - started = True def dbcheck(): diff --git a/headphones/versioncheck.py b/headphones/versioncheck.py index f66eacdc..1cd4f08c 100644 --- a/headphones/versioncheck.py +++ b/headphones/versioncheck.py @@ -115,6 +115,8 @@ def checkGithub(): if headphones.LATEST_VERSION == headphones.CURRENT_VERSION: logger.info('Headphones is already up-to-date.') + return latest_commit + def update():