Fix Vidoteca e download in unità di rete
This commit is contained in:
@@ -225,6 +225,8 @@ def save_movie(item):
|
||||
|
||||
def filter_list(episodelist, action=None, path=None):
|
||||
if path: path = path.decode('utf8')
|
||||
# import xbmc
|
||||
# if xbmc.getCondVisibility('system.platform.windows') > 0: path = path.replace('smb:','').replace('/','\\')
|
||||
channel_prefs = {}
|
||||
lang_sel = quality_sel = show_title = channel =''
|
||||
if action:
|
||||
@@ -234,10 +236,10 @@ def filter_list(episodelist, action=None, path=None):
|
||||
show_title = tvshow_item.infoLabels['tvshowtitle']
|
||||
if not tvshow_item.channel_prefs:
|
||||
tvshow_item.channel_prefs={channel:{}}
|
||||
list_item = os.listdir(path)
|
||||
list_item = filetools.listdir(path)
|
||||
for File in list_item:
|
||||
if (File.endswith('.strm') or File.endswith('.json') or File.endswith('.nfo')):
|
||||
os.remove(os.path.join(path, File))
|
||||
filetools.remove(filetools.join(path, File))
|
||||
if channel not in tvshow_item.channel_prefs:
|
||||
tvshow_item.channel_prefs[channel] = {}
|
||||
channel_prefs = tvshow_item.channel_prefs[channel]
|
||||
|
||||
@@ -302,7 +302,7 @@ def move_to_libray(item):
|
||||
|
||||
logger.info('ITEM = ' + str(item))
|
||||
name = item.contentTitle if item.contentType == 'movie' else str(item.infoLabels['season']) + 'x' + str(item.infoLabels['episode']).zfill(2)
|
||||
list_item = os.listdir(filetools.join(config.get_videolibrary_path(), FOLDER, path_title))
|
||||
list_item = filetools.listdir(filetools.join(config.get_videolibrary_path(), FOLDER, path_title))
|
||||
|
||||
clean = False
|
||||
for File in list_item:
|
||||
@@ -310,8 +310,8 @@ def move_to_libray(item):
|
||||
name = name.lower()
|
||||
if filename.startswith(name) and (filename.endswith('.strm') or filename.endswith('.json') or filename.endswith('.nfo')):
|
||||
clean = True
|
||||
logger.info('Delete File: ' + str(os.path.join(config.get_videolibrary_path(), FOLDER, path_title, File)))
|
||||
os.remove(os.path.join(config.get_videolibrary_path(), FOLDER, path_title, File))
|
||||
logger.info('Delete File: ' + str(filetools.join(config.get_videolibrary_path(), FOLDER, path_title, File)))
|
||||
filetools.remove(filetools.join(config.get_videolibrary_path(), FOLDER, path_title, File))
|
||||
|
||||
from platformcode import xbmc_videolibrary
|
||||
|
||||
|
||||
Reference in New Issue
Block a user