Add setup RT

This commit is contained in:
angelblue05 2018-12-13 04:41:34 -06:00
parent 5d6e106ef3
commit 3dc72287b3
3 changed files with 31 additions and 10 deletions

View file

@ -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 ""

View file

@ -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))

View file

@ -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
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))