Rimosso ReloadSkin da update + Cancellazione sì/no contenuti locali + Nuovo metodo get_local_content
This commit is contained in:
@@ -593,15 +593,6 @@ def save_episodes(path, episodelist, serie, silent=False, overwrite=True):
|
||||
raiz, carpetas_series, ficheros = next(filetools.walk(path))
|
||||
ficheros = [filetools.join(path, f) for f in ficheros]
|
||||
|
||||
nostrm_episodelist = []
|
||||
for root, folders, files in filetools.walk(path):
|
||||
for file in files:
|
||||
season_episode = scrapertools.get_season_and_episode(file)
|
||||
if season_episode == "" or filetools.exists(filetools.join(path, "%s.strm" % season_episode)):
|
||||
continue
|
||||
nostrm_episodelist.append(season_episode)
|
||||
nostrm_episodelist = sorted(set(nostrm_episodelist))
|
||||
|
||||
# Silent es para no mostrar progreso (para service)
|
||||
if not silent:
|
||||
# progress dialog
|
||||
@@ -679,6 +670,8 @@ def save_episodes(path, episodelist, serie, silent=False, overwrite=True):
|
||||
except:
|
||||
t = 0
|
||||
|
||||
local_episodelist = get_local_content(path)
|
||||
|
||||
last_season_episode = ''
|
||||
for i, e in enumerate(scraper.sort_episode_list(new_episodelist)):
|
||||
if not silent:
|
||||
@@ -701,7 +694,7 @@ def save_episodes(path, episodelist, serie, silent=False, overwrite=True):
|
||||
nfo_path = filetools.join(path, "%s.nfo" % season_episode)
|
||||
json_path = filetools.join(path, ("%s [%s].json" % (season_episode, e.channel)).lower())
|
||||
|
||||
if season_episode in nostrm_episodelist:
|
||||
if season_episode in local_episodelist:
|
||||
logger.info('Skipped: Serie ' + serie.contentSerieName + ' ' + season_episode + ' available as local content')
|
||||
continue
|
||||
strm_exists = strm_path in ficheros
|
||||
@@ -844,6 +837,21 @@ def save_episodes(path, episodelist, serie, silent=False, overwrite=True):
|
||||
return insertados, sobreescritos, fallidos
|
||||
|
||||
|
||||
def get_local_content(path):
|
||||
logger.info()
|
||||
|
||||
local_episodelist = []
|
||||
for root, folders, files in filetools.walk(path):
|
||||
for file in files:
|
||||
season_episode = scrapertools.get_season_and_episode(file)
|
||||
if season_episode == "" or filetools.exists(filetools.join(path, "%s.strm" % season_episode)):
|
||||
continue
|
||||
local_episodelist.append(season_episode)
|
||||
local_episodelist = sorted(set(local_episodelist))
|
||||
|
||||
return local_episodelist
|
||||
|
||||
|
||||
def add_movie(item):
|
||||
"""
|
||||
guarda una pelicula en la libreria de cine. La pelicula puede ser un enlace dentro de un canal o un video
|
||||
|
||||
@@ -511,7 +511,7 @@ def update(folder_content=config.get_setting("folder_tvshows"), folder=""):
|
||||
|
||||
data = get_data(payload)
|
||||
|
||||
xbmc.executebuiltin('XBMC.ReloadSkin()')
|
||||
#xbmc.executebuiltin('XBMC.ReloadSkin()')
|
||||
|
||||
|
||||
def search_library_path():
|
||||
|
||||
@@ -697,7 +697,7 @@ msgid "Delete movie/channel"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#60019"
|
||||
msgid "Delete this movie"
|
||||
msgid "Delete movie"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#60020"
|
||||
@@ -789,7 +789,7 @@ msgid "Delete TV show"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#60042"
|
||||
msgid "Delete only the links of %s"
|
||||
msgid "Delete links of %s"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#60043"
|
||||
@@ -3121,7 +3121,11 @@ msgid "Show only links of "
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#70079"
|
||||
msgid "Remove only links of "
|
||||
msgid "Delete ony the links of "
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#70081"
|
||||
msgid "The folder also contains local or downloaded video files. Do you want to delete them?"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#70082"
|
||||
@@ -3141,7 +3145,7 @@ msgid "Delete TV show"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#70086"
|
||||
msgid "Remove only links of %s"
|
||||
msgid "Delete only the links of %s"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#70087"
|
||||
|
||||
@@ -696,8 +696,8 @@ msgid "Delete movie/channel"
|
||||
msgstr "Elimina film/canale"
|
||||
|
||||
msgctxt "#60019"
|
||||
msgid "Delete this movie"
|
||||
msgstr "Elimina questo film"
|
||||
msgid "Delete movie"
|
||||
msgstr "Elimina film"
|
||||
|
||||
msgctxt "#60020"
|
||||
msgid "Mark TV show as not watched"
|
||||
@@ -781,15 +781,15 @@ msgstr "Errore nel canale %s"
|
||||
|
||||
msgctxt "#60040"
|
||||
msgid "Delete movie"
|
||||
msgstr "Rimuovere film"
|
||||
msgstr "Elimina film"
|
||||
|
||||
msgctxt "#60041"
|
||||
msgid "Delete TV show"
|
||||
msgstr "Rimuovere serie TV"
|
||||
msgstr "Elimina serie TV"
|
||||
|
||||
msgctxt "#60042"
|
||||
msgid "Delete only the links of %s"
|
||||
msgstr "Rimuovere solo i link dei %s"
|
||||
msgid "Delete links of %s"
|
||||
msgstr "Elimina link di %s"
|
||||
|
||||
msgctxt "#60043"
|
||||
msgid "Delete %s links of channel %s"
|
||||
@@ -3120,8 +3120,12 @@ msgid "Show only links of "
|
||||
msgstr "Mostra solo link di "
|
||||
|
||||
msgctxt "#70079"
|
||||
msgid "Remove only links of "
|
||||
msgstr "Rimuovere solo i collegamenti di "
|
||||
msgid "Delete only the links of "
|
||||
msgstr "Elimina solo i link di "
|
||||
|
||||
msgctxt "#70081"
|
||||
msgid "The folder also contains local or downloaded video files. Do you want to delete them?"
|
||||
msgstr "La cartella contiene anche file video locali o scaricati. Vuoi eliminarli?"
|
||||
|
||||
msgctxt "#70082"
|
||||
msgid "Global Search"
|
||||
@@ -3140,12 +3144,12 @@ msgid "Delete TV show"
|
||||
msgstr "Elimina serie TV"
|
||||
|
||||
msgctxt "#70086"
|
||||
msgid "Remove only links of %s"
|
||||
msgstr "Rimuovere solo i collegamenti di %s"
|
||||
msgid "Delete only the links of %s"
|
||||
msgstr "Elimina solo i link di %s"
|
||||
|
||||
msgctxt "#70087"
|
||||
msgid "Deleted %s links from canal %s"
|
||||
msgstr "Eliminati %s links del canale %s"
|
||||
msgstr "Eliminati %s link del canale %s"
|
||||
|
||||
msgctxt "#70088"
|
||||
msgid "Are you sure you want to delete '%s' from video library?"
|
||||
|
||||
@@ -1026,6 +1026,13 @@ def delete(item):
|
||||
raiz, carpeta_serie, ficheros = next(filetools.walk(_item.path))
|
||||
if ficheros == []:
|
||||
filetools.rmdir(_item.path)
|
||||
else:
|
||||
if _item.contentType == 'movie':
|
||||
heading = config.get_localized_string(70084)
|
||||
else:
|
||||
heading = config.get_localized_string(70085)
|
||||
if platformtools.dialog_yesno(heading, config.get_localized_string(70081)):
|
||||
filetools.rmdirtree(_item.path)
|
||||
|
||||
if config.is_xbmc() and config.get_setting("videolibrary_kodi"):
|
||||
from platformcode import xbmc_videolibrary
|
||||
|
||||
Reference in New Issue
Block a user