Spostamento videoteca (fix widget)

This commit is contained in:
axlt2002
2020-04-01 00:10:10 +02:00
parent 38a726afb0
commit 6e405f3b08
3 changed files with 4 additions and 11 deletions

View File

@@ -936,6 +936,8 @@ def update_db(current_path, new_path, current_movies_folder, new_movies_folder,
p += 5
progress.update(p, config.get_localized_string(20000), config.get_localized_string(80013))
xbmc.executebuiltin('XBMC.ReloadSkin()')
def clear_db():
logger.info()
@@ -1001,7 +1003,7 @@ def clear_db():
nun_records, records = execute_sql_kodi(sql)
progress.update(80)
update_sources(path)
clear_cache()
xbmc.executebuiltin('XBMC.ReloadSkin()')
progress.update(100)
progress.close()
@@ -1226,13 +1228,6 @@ def update_sources(old, new=''):
xmldoc.appendChild(source_nodes)
def clear_cache():
path = xbmc.translatePath('special://home/cache/archive_cache/')
for file in filetools.listdir(path):
filetools.remove(filetools.join(path, file))
# xbmc.executebuiltin('XBMC.ReloadSkin()')
def ask_set_content(silent=False):
logger.info()
logger.debug("videolibrary_kodi %s" % config.get_setting("videolibrary_kodi"))

View File

@@ -31,9 +31,8 @@
<setting id="videolibrarypath" type="folder" label="30067" default="special://profile/addon_data/plugin.video.kod/videolibrary" option="writeable"/>
<setting id="folder_tvshows" type="text" label="70118" default="Serie TV"/>
<setting id="folder_movies" type="text" label="70119" default="Film"/>
<setting label="59997" type="lsep"/>
<setting id="videolibrary_kodi" type="bool" label="70120" default="false"/>
<setting label="59997" type="lsep"/>
<setting id="videolibrary_max_quality" type="bool" label="70729" default="false" visible="true"/>
<setting id="next_ep" type="select" label="70746" lvalues="70752|70747|70748" default="0"/>
<setting id="next_ep_type" type="select" label="70754" lvalues="70755|70756|70757" default="0" visible="eq(-1,2)" subsetting="true"/>

View File

@@ -720,7 +720,6 @@ def move_videolibrary(current_path, new_path, current_movies_folder, new_movies_
from platformcode import xbmc_videolibrary
xbmc_videolibrary.update_sources(backup_current_path, backup_new_path)
xbmc_videolibrary.update_db(backup_current_path, backup_new_path, current_movies_folder, new_movies_folder, current_tvshows_folder, new_tvshows_folder, progress)
xbmc_videolibrary.clear_cache()
progress.update(100)
progress.close()