add option to force videolibrary configuration
This commit is contained in:
@@ -65,7 +65,7 @@ def run(item=None):
|
||||
item = Item(channel="channelselector", action="getmainlist", viewmode="movie")
|
||||
if not config.get_setting('show_once'):
|
||||
from platformcode import xbmc_videolibrary
|
||||
xbmc_videolibrary.ask_set_content(1)
|
||||
xbmc_videolibrary.ask_set_content(1, config.get_setting('videolibrary_kodi_force'))
|
||||
config.set_setting('show_once', True)
|
||||
|
||||
logger.info(item.tostring())
|
||||
|
||||
@@ -535,12 +535,17 @@ def set_content(content_type, silent=False):
|
||||
continuar = True
|
||||
msg_text = ""
|
||||
videolibrarypath = config.get_setting("videolibrarypath")
|
||||
forced = config.get_setting('videolibrary_kodi_force')
|
||||
|
||||
if content_type == 'movie':
|
||||
scraper = [config.get_localized_string(70093), config.get_localized_string(70096)]
|
||||
seleccion = platformtools.dialog_select(config.get_localized_string(70094), scraper)
|
||||
if forced:
|
||||
seleccion = 0 # tmdb
|
||||
else:
|
||||
seleccion = platformtools.dialog_select(config.get_localized_string(70094), scraper)
|
||||
|
||||
# Instalar The Movie Database
|
||||
|
||||
# Instalar The Movie Database
|
||||
if seleccion == -1 or seleccion == 0:
|
||||
if not xbmc.getCondVisibility('System.HasAddon(metadata.themoviedb.org)'):
|
||||
if not silent:
|
||||
@@ -560,7 +565,7 @@ def set_content(content_type, silent=False):
|
||||
continuar = (install and xbmc.getCondVisibility('System.HasAddon(metadata.themoviedb.org)'))
|
||||
if not continuar:
|
||||
msg_text = config.get_localized_string(60047)
|
||||
if continuar:
|
||||
if continuar and not forced:
|
||||
xbmc.executebuiltin('xbmc.addon.opensettings(metadata.themoviedb.org)', True)
|
||||
|
||||
# Instalar Universal Movie Scraper
|
||||
@@ -584,12 +589,15 @@ def set_content(content_type, silent=False):
|
||||
continuar = (install and continuar)
|
||||
if not continuar:
|
||||
msg_text = config.get_localized_string(70097)
|
||||
if continuar:
|
||||
if continuar and not forced:
|
||||
xbmc.executebuiltin('xbmc.addon.opensettings(metadata.universal)', True)
|
||||
|
||||
else: # SERIES
|
||||
scraper = [config.get_localized_string(70098), config.get_localized_string(70093)]
|
||||
seleccion = platformtools.dialog_select(config.get_localized_string(70107), scraper)
|
||||
if forced:
|
||||
seleccion = 0 # tvdb
|
||||
else:
|
||||
seleccion = platformtools.dialog_select(config.get_localized_string(70107), scraper)
|
||||
|
||||
# Instalar The TVDB
|
||||
if seleccion == -1 or seleccion == 0:
|
||||
@@ -611,7 +619,7 @@ def set_content(content_type, silent=False):
|
||||
continuar = (install and xbmc.getCondVisibility('System.HasAddon(metadata.tvdb.com)'))
|
||||
if not continuar:
|
||||
msg_text = config.get_localized_string(70099)
|
||||
if continuar:
|
||||
if continuar and not forced:
|
||||
xbmc.executebuiltin('xbmc.addon.opensettings(metadata.tvdb.com)', True)
|
||||
|
||||
# Instalar The Movie Database
|
||||
@@ -636,7 +644,7 @@ def set_content(content_type, silent=False):
|
||||
continuar = (install and continuar)
|
||||
if not continuar:
|
||||
msg_text = config.get_localized_string(60047)
|
||||
if continuar:
|
||||
if continuar and not forced:
|
||||
xbmc.executebuiltin('xbmc.addon.opensettings(metadata.tvshows.themoviedb.org)', True)
|
||||
|
||||
idPath = 0
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
<setting id="folder_tvshows" type="text" label="70118" default="SERIES"/>
|
||||
<setting id="folder_movies" type="text" label="70119" default="CINE"/>
|
||||
<setting id="videolibrary_kodi_flag" type="number" label="" default="0" visible="false"/>
|
||||
<setting id="videolibrary_kodi_force" type="bool" label="" default="false" visible="false"/>
|
||||
<setting id="videolibrary_kodi" type="bool" label="70120" enable="lt(-1,2)+eq(0,false)" default="false"/>
|
||||
</category>
|
||||
<category label="70121">
|
||||
@@ -145,5 +146,4 @@
|
||||
<setting label="70583" type="lsep"/>
|
||||
<setting id="addon_quasar_update" type="bool" label="70584" default="false"/>
|
||||
</category>
|
||||
|
||||
</settings>
|
||||
Reference in New Issue
Block a user