diff --git a/resources/language/resource.language.en_gb/strings.po b/resources/language/resource.language.en_gb/strings.po index a5c088bd..afe93413 100644 --- a/resources/language/resource.language.en_gb/strings.po +++ b/resources/language/resource.language.en_gb/strings.po @@ -917,3 +917,7 @@ msgstr "" msgctxt "#33187" msgid "Sync rotten tomatoes ratings" msgstr "" + +msgctxt "#33188" +msgid "Would you like to sync rotten tomatoes ratings?" +msgstr "" diff --git a/resources/lib/database/__init__.py b/resources/lib/database/__init__.py index 8d7e623a..fac980e6 100644 --- a/resources/lib/database/__init__.py +++ b/resources/lib/database/__init__.py @@ -152,7 +152,7 @@ def reset(): xbmcvfs.delete(os.path.join(addon_data, "sync.json")) settings('enableMusic.bool', False) - settings('MinimumSetup.bool', False) + settings('MinimumSetup', "") settings('MusicRescan.bool', False) settings('SyncInstallRunDone.bool', False) dialog("ok", heading="{emby}", line1=_(33088)) diff --git a/resources/lib/setup.py b/resources/lib/setup.py index abb847e0..6701ecbc 100644 --- a/resources/lib/setup.py +++ b/resources/lib/setup.py @@ -6,7 +6,7 @@ import logging import xbmc -from helper import _, settings, dialog, JSONRPC +from helper import _, settings, dialog, JSONRPC, compare_version ################################################################################################# @@ -65,17 +65,29 @@ class Setup(object): def setup(self): - minimum = "3.0.23" + minimum = "3.0.24" + cached = settings('MinimumSetup') - if settings('MinimumSetup') == minimum: + if cached == minimum: return - self._is_mode() - LOG.info("Add-on playback: %s", settings('useDirectPaths') == "0") - self._is_artwork_caching() - LOG.info("Artwork caching: %s", settings('enableTextureCache.bool')) - self._is_empty_shows() - LOG.info("Sync empty shows: %s", settings('syncEmptyShows.bool')) + if not cached: + + self._is_mode() + LOG.info("Add-on playback: %s", settings('useDirectPaths') == "0") + self._is_artwork_caching() + LOG.info("Artwork caching: %s", settings('enableTextureCache.bool')) + self._is_empty_shows() + LOG.info("Sync empty shows: %s", settings('syncEmptyShows.bool')) + self._is_rotten_tomatoes() + LOG.info("Sync rotten tomatoes: %s", settings('syncRottenTomatoes.bool')) + + """ + if compare_version(cached or minimum, "3.0.24") <= 0: + + self._is_rotten_tomatoes() + LOG.info("Sync rotten tomatoes: %s", settings('syncRottenTomatoes.bool')) + """ # Setup completed settings('MinimumSetup', minimum) @@ -105,6 +117,11 @@ class Setup(object): value = dialog("yesno", heading="{emby}", line1=_(33100)) settings('syncEmptyShows.bool', value) + def _is_rotten_tomatoes(self): + + value = dialog("yesno", heading="{emby}", line1=_(33188)) + settings('syncRottenTomatoes.bool', value) + def _is_music(self): value = dialog("yesno", heading="{emby}", line1=_(33039))