Merge remote-tracking branch 'origin/master'

# Conflicts:
#	resources/settings.xml
This commit is contained in:
marco
2020-04-09 13:37:41 +02:00
11 changed files with 276 additions and 215 deletions
+4 -6
View File
@@ -348,18 +348,15 @@ def menu(item):
def move_to_libray(item):
title = item.fulltitle
if config.get_setting("lowerize_title", "videolibrary"):
title = title.lower()
if item.contentType == 'movie':
FOLDER = FOLDER_MOVIES
path_title = "%s [%s]" % (title, item.infoLabels['IMDBNumber'])
path_title = "%s [%s]" % (item.contentTitle.strip() if item.contentTitle else item.fulltitle.strip() , item.infoLabels['IMDBNumber'])
move_path = filetools.join(config.get_videolibrary_path(), FOLDER, path_title)
else:
FOLDER = FOLDER_TVSHOWS
path_title = "%s [%s]" % (title, item.infoLabels['IMDBNumber'])
path_title = os.path.dirname(item.downloadFilename)
move_path = filetools.join(config.get_videolibrary_path(), FOLDER)
download_path = filetools.join(DOWNLOAD_PATH, item.downloadFilename)
@@ -389,6 +386,7 @@ def move_to_libray(item):
for File in list_item:
filename = File.lower()
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(filetools.join(config.get_videolibrary_path(), FOLDER, path_title, File)))
@@ -815,7 +813,7 @@ def start_download(item):
def get_episodes(item):
logger.info("contentAction: %s | contentChannel: %s | contentType: %s" % (
item.contentAction, item.contentChannel, item.contentType))
if 'dlseason' in item:
season = True
season_number = item.dlseason
+11 -1
View File
@@ -704,6 +704,17 @@ def move_videolibrary(current_path, new_path, current_movies_folder, new_movies_
current_tvshows_path = os.path.join(current_path, current_tvshows_folder)
new_tvshows_path = os.path.join(new_path, new_tvshows_folder)
from platformcode import xbmc_videolibrary
if xbmc_videolibrary.check_sources(new_movies_path+'\\', new_tvshows_path+'\\'):
config.set_setting("videolibrarypath", current_path)
config.set_setting("folder_movies", current_movies_folder)
config.set_setting("folder_tvshows", current_tvshows_folder)
progress.update(100)
xbmc.sleep(1000)
progress.close()
platformtools.dialog_ok(config.get_localized_string(20000), config.get_localized_string(80028))
return
config.verify_directories_created()
progress.update(10, config.get_localized_string(20000), config.get_localized_string(80012))
if current_movies_path != new_movies_path:
@@ -721,7 +732,6 @@ def move_videolibrary(current_path, new_path, current_movies_folder, new_movies_
if current_path != new_path and not filetools.listdir(current_path) and not "plugin.video.kod\\videolibrary" in current_path:
filetools.rmdirtree(current_path)
from platformcode import xbmc_videolibrary
xbmc_videolibrary.update_sources(backup_new_path, backup_current_path)
if config.is_xbmc() and config.get_setting("videolibrary_kodi"):
xbmc_videolibrary.update_db(backup_current_path, backup_new_path, current_movies_folder, new_movies_folder, current_tvshows_folder, new_tvshows_folder, progress)