fix crash on videolibrary
This commit is contained in:
@@ -112,12 +112,6 @@ def list_movies(item, silent=False):
|
||||
if not filetools.exists(filetools.join(new_item.path, filetools.basename(strm_path))):
|
||||
# Si se ha eliminado el strm desde la bilbioteca de kodi, no mostrarlo
|
||||
continue
|
||||
|
||||
###### Redirección al canal NewPct1.py si es un clone, o a otro canal y url si ha intervención judicial
|
||||
try:
|
||||
new_item, new_item, overwrite = generictools.redirect_clone_newpct1(new_item, head_nfo, new_item, raiz)
|
||||
except:
|
||||
logger.error(traceback.format_exc())
|
||||
|
||||
# Menu contextual: Marcar como visto/no visto
|
||||
visto = new_item.library_playcounts.get(os.path.splitext(f)[0], 0)
|
||||
@@ -466,11 +460,7 @@ def findvideos(item):
|
||||
if 'downloads' in list_canales:
|
||||
json_path = list_canales['downloads']
|
||||
item_json = Item().fromjson(filetools.read(json_path))
|
||||
###### Redirección al canal NewPct1.py si es un clone, o a otro canal y url si ha intervención judicial
|
||||
try:
|
||||
item_json, it, overwrite = generictools.redirect_clone_newpct1(item_json)
|
||||
except:
|
||||
logger.error(traceback.format_exc())
|
||||
|
||||
item_json.contentChannel = "local"
|
||||
# Soporte para rutas relativas en descargas
|
||||
if filetools.is_relative(item_json.url):
|
||||
@@ -511,11 +501,7 @@ def findvideos(item):
|
||||
|
||||
item_canal = Item()
|
||||
item_canal.channel = nom_canal
|
||||
###### Redirección al canal NewPct1.py si es un clone, o a otro canal y url si ha intervención judicial
|
||||
try:
|
||||
item_canal, it, overwrite = generictools.redirect_clone_newpct1(item_canal)
|
||||
except:
|
||||
logger.error(traceback.format_exc())
|
||||
|
||||
nom_canal = item_canal.channel
|
||||
|
||||
# Importamos el canal de la parte seleccionada
|
||||
@@ -525,11 +511,7 @@ def findvideos(item):
|
||||
exec "import channels." + nom_canal + " as channel"
|
||||
|
||||
item_json = Item().fromjson(filetools.read(json_path))
|
||||
###### Redirección al canal NewPct1.py si es un clone, o a otro canal y url si ha intervención judicial
|
||||
try:
|
||||
item_json, it, overwrite = generictools.redirect_clone_newpct1(item_json)
|
||||
except:
|
||||
logger.error(traceback.format_exc())
|
||||
|
||||
list_servers = []
|
||||
|
||||
try:
|
||||
|
||||
@@ -2224,7 +2224,7 @@ def redirect_clone_newpct1(item, head_nfo=None, it=None, path=False, overwrite=F
|
||||
# logger.error(item)
|
||||
#
|
||||
# return (item, it, overwrite)
|
||||
return item, Item(), False
|
||||
return item, item, False
|
||||
|
||||
|
||||
def verify_cached_torrents():
|
||||
|
||||
@@ -45,7 +45,6 @@ def update(path, p_dialog, i, t, serie, overwrite):
|
||||
if it.emergency_urls:
|
||||
serie.emergency_urls = it.emergency_urls
|
||||
serie.category = category
|
||||
serie, it, overwrite = generictools.redirect_clone_newpct1(serie, head_nfo, it, path, overwrite)
|
||||
except:
|
||||
logger.error(traceback.format_exc())
|
||||
|
||||
@@ -135,16 +134,6 @@ def check_for_update(overwrite=True):
|
||||
for i, tvshow_file in enumerate(show_list):
|
||||
head_nfo, serie = videolibrarytools.read_nfo(tvshow_file)
|
||||
path = filetools.dirname(tvshow_file)
|
||||
|
||||
###### Redirección al canal NewPct1.py si es un clone, o a otro canal y url si ha intervención judicial
|
||||
overwrite_forced = False
|
||||
try:
|
||||
serie, serie, overwrite_forced = generictools.redirect_clone_newpct1(serie, head_nfo, serie, path, overwrite, lookup=True)
|
||||
except:
|
||||
logger.error(traceback.format_exc())
|
||||
if overwrite_forced == True:
|
||||
overwrite = True
|
||||
serie.update_next = ''
|
||||
|
||||
logger.info("serie=" + serie.contentSerieName)
|
||||
p_dialog.update(int(math.ceil((i + 1) * t)), heading, serie.contentSerieName)
|
||||
|
||||
Reference in New Issue
Block a user