diff --git a/legendary/cli.py b/legendary/cli.py index fbf4731..258edce 100644 --- a/legendary/cli.py +++ b/legendary/cli.py @@ -1432,7 +1432,7 @@ def main(): logger.info('Command was aborted via KeyboardInterrupt, cleaning up...') # show note if update is available - if cli.core.update_available: + if cli.core.update_available and cli.core.update_notice_enabled(): if update_info := cli.core.get_update_info(): print(f'\nLegendary update available!') print(f'- New version: {update_info["version"]} - "{update_info["name"]}"') diff --git a/legendary/core.py b/legendary/core.py index ab2c7ec..9ed5d02 100644 --- a/legendary/core.py +++ b/legendary/core.py @@ -79,6 +79,7 @@ class LegendaryCore: self.log.warning(f'Could not determine locale, falling back to en-US') self.update_available = False + self.force_show_update = False def auth(self, username, password): """ @@ -201,8 +202,13 @@ class LegendaryCore: return True def update_check_enabled(self): - return self.lgd.config.getboolean('Legendary', 'enable_update_check', - fallback=os.name == 'nt') + return not self.lgd.config.getboolean('Legendary', 'disable_update_check', fallback=False) + + def update_notice_enabled(self): + if self.force_show_update: + return True + return not self.lgd.config.getboolean('Legendary', 'disable_update_notice', + fallback=os.name != 'nt') def check_for_updates(self, force=False): def version_tuple(v):