From 63f95d7b68cb456fdb033ccaa3e10d6809ba8f2b Mon Sep 17 00:00:00 2001 From: axlt2002 Date: Wed, 8 Apr 2020 18:08:21 +0200 Subject: [PATCH 1/5] Aggiornato impostazioni (settings.xml) --- platformcode/platformtools.py | 6 - platformcode/updater.py | 5 +- resources/language/English/strings.po | 78 ++++++----- resources/language/Italian/strings.po | 146 +++++++++++--------- resources/settings.xml | 190 ++++++++++++-------------- 5 files changed, 222 insertions(+), 203 deletions(-) diff --git a/platformcode/platformtools.py b/platformcode/platformtools.py index 29cf618a..9d986016 100644 --- a/platformcode/platformtools.py +++ b/platformcode/platformtools.py @@ -213,12 +213,6 @@ def render_items(itemlist, parent_item): set_view_mode(item, parent_item) xbmcplugin.endOfDirectory(_handle) - # Fijar la vista - if config.get_setting("forceview"): - viewmode_id = get_viewmode_id(parent_item) - xbmc.executebuiltin("Container.SetViewMode(%s)" % viewmode_id) - if parent_item.mode in ['silent', 'get_cached', 'set_cache', 'finish']: - xbmc.executebuiltin("Container.SetViewMode(500)") logger.info('END render_items') diff --git a/platformcode/updater.py b/platformcode/updater.py index cfcb379e..fbc419ea 100644 --- a/platformcode/updater.py +++ b/platformcode/updater.py @@ -5,7 +5,7 @@ import shutil from lib.six import BytesIO from core import filetools -from platformcode import logger, platformtools +from platformcode import config, logger, platformtools import json import xbmc import re @@ -19,6 +19,7 @@ import sys PY3 = False if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int addon = xbmcaddon.Addon('plugin.video.kod') +addonname = addon.getAddonInfo('name') _hdr_pat = re.compile("^@@ -(\d+),?(\d+)? \+(\d+),?(\d+)? @@.*") @@ -43,7 +44,7 @@ def loadCommits(page=1): except: xbmc.sleep(1000) else: - platformtools.dialog_notification('Kodi on Demand', 'impossibile controllare gli aggiornamenti') + platformtools.dialog_notification(addonname, config.get_localized_string(70675)) ret = None return ret diff --git a/resources/language/English/strings.po b/resources/language/English/strings.po index f086a5ac..adcf1b0b 100644 --- a/resources/language/English/strings.po +++ b/resources/language/English/strings.po @@ -78,15 +78,15 @@ msgid "Password" msgstr "" msgctxt "#30017" -msgid "Download path" +msgid "Download path*" msgstr "" msgctxt "#30018" -msgid "Download list path" +msgid "Download list path*" msgstr "" msgctxt "#30019" -msgid "Filter channels by language" +msgid "Channels language" msgstr "" msgctxt "#30020" @@ -206,7 +206,7 @@ msgid "Unsopported Server" msgstr "" msgctxt "#30067" -msgid "Path" +msgid "Path*" msgstr "" msgctxt "#30068" @@ -1563,7 +1563,7 @@ msgid "Information" msgstr "" msgctxt "#60349" -msgid "Go to the Main Menu" +msgid "Go to the main menu" msgstr "" msgctxt "#60350" @@ -1583,7 +1583,7 @@ msgid "Add movie to video library" msgstr "" msgctxt "#60354" -msgid "Download Movie" +msgid "Download movie" msgstr "" msgctxt "#60355" @@ -1591,19 +1591,19 @@ msgid "Download TV show" msgstr "" msgctxt "#60356" -msgid "Download Episode" +msgid "Download episode" msgstr "" msgctxt "#60357" -msgid "Download Season" +msgid "Download season" msgstr "" msgctxt "#60358" -msgid "Open Configuration" +msgid "Open configuration" msgstr "" msgctxt "#60359" -msgid "Search Trailer" +msgid "Search trailer" msgstr "" msgctxt "#60360" @@ -1611,7 +1611,7 @@ msgid "Show quick menu" msgstr "" msgctxt "#60361" -msgid "Super Favourites Menu" +msgid "Super favourites menu" msgstr "" msgctxt "#60362" @@ -1819,8 +1819,8 @@ msgid "Channels included in the global search " msgstr "" msgctxt "#60422" -msgid "Search " -msgstr "" +msgid "Channels search" +msgstr "Ricerca canali" msgctxt "#60423" msgid "Search" @@ -2851,7 +2851,7 @@ msgid "Reload" msgstr "" msgctxt "#70009" -msgid "Classic Menu" +msgid "Main menu" msgstr "" msgctxt "#70010" @@ -2927,7 +2927,7 @@ msgid "Search engine settings" msgstr "" msgctxt "#70028" -msgid "Most Popular" +msgid "Most popular" msgstr "" msgctxt "#70029" @@ -3215,7 +3215,7 @@ msgid "Video library %s configured" msgstr "" msgctxt "#70104" -msgid "The Kodi video library has been configured correctly" +msgid "The Kodi video library has been successfully configured" msgstr "" msgctxt "#70105" @@ -3271,15 +3271,15 @@ msgid "Confirm new password" msgstr "" msgctxt "#70118" -msgid "TV shows folder" +msgid "TV shows folder*" msgstr "" msgctxt "#70119" -msgid "Movies folder" +msgid "Movies folder*" msgstr "" msgctxt "#70120" -msgid "Add KoD content to Kodi video library" +msgid "Add KoD content to Kodi video library*" msgstr "" msgctxt "#70121" @@ -3407,11 +3407,11 @@ msgid "Show ExtendedInfo" msgstr "" msgctxt "#70153" -msgid "KoD shortcut" +msgid "Shortcut" msgstr "" msgctxt "#70154" -msgid "TMDB search options" +msgid "TMDB search" msgstr "" msgctxt "#70155" @@ -5003,15 +5003,15 @@ msgid "Select color:" msgstr "" msgctxt "#70559" -msgid "Now in Theatres " +msgid "Now in theatres " msgstr "" msgctxt "#70560" -msgid "Movies by Genre" +msgid "Movies by genre" msgstr "" msgctxt "#70561" -msgid "Search Similar" +msgid "Search similar" msgstr "" msgctxt "#70562" @@ -5083,7 +5083,7 @@ msgid "Torrents" msgstr "" msgctxt "#70579" -msgid "KoD update" +msgid "Updates" msgstr "" msgctxt "#70580" @@ -5478,7 +5478,7 @@ msgid "KoD updates" msgstr "" msgctxt "#70675" -msgid "Error checking updates" +msgid "Impossible to check the updates" msgstr "" msgctxt "#70676" @@ -5630,11 +5630,11 @@ msgid "Modify " msgstr " " msgctxt "#70715" -msgid "Customized homepage" +msgid "Customized main menu" msgstr "" msgctxt "#70716" -msgid "Homepage categories" +msgid "Main menu items" msgstr "" msgctxt "#70717" @@ -5786,7 +5786,7 @@ msgid "Playback" msgstr "" msgctxt "#70754" -msgid "Display mode" +msgid "View types" msgstr "" msgctxt "#70755" @@ -5913,14 +5913,30 @@ msgctxt "#70785" msgid "Install Quasar" msgstr "" +msgctxt "#70786" +msgid "Autostart" +msgstr "" + +msgctxt "#70787" +msgid "Network" +msgstr "" + +msgctxt "#70788" +msgid "Logging" +msgstr "" + +msgctxt "#70789" +msgid "* Change by opening the settings from the main menu of KoD" +msgstr "" + # DNS start [ settings and declaration ] msgctxt "#707401" -msgid "Enable DNS Check Alert" +msgid "Enable DNS check alert" msgstr "" msgctxt "#707402" -msgid "Connection or DNS problems" +msgid "Connection or DNS problem" msgstr "" msgctxt "#707403" diff --git a/resources/language/Italian/strings.po b/resources/language/Italian/strings.po index a78c9bb6..27b197b9 100644 --- a/resources/language/Italian/strings.po +++ b/resources/language/Italian/strings.po @@ -78,16 +78,16 @@ msgid "Password" msgstr "Password" msgctxt "#30017" -msgid "Download path" -msgstr "Percorso download" +msgid "Download path*" +msgstr "Percorso download*" msgctxt "#30018" -msgid "Download list path" -msgstr "Percorso lista downloads" +msgid "Download list path*" +msgstr "Percorso lista downloads*" msgctxt "#30019" -msgid "Filter channels by language" -msgstr "Filtra canale per lingua" +msgid "Channels language" +msgstr "Lingua canali" msgctxt "#30020" msgid "Check if the links exist" @@ -107,7 +107,7 @@ msgstr "NO" msgctxt "#30024" msgid "Contextual menu" -msgstr "Menu contestuale" +msgstr "Menù contestuale" msgctxt "#30025" msgid "Show KoD settings" @@ -206,8 +206,8 @@ msgid "Unsopported Server" msgstr "Server non supportato" msgctxt "#30067" -msgid "Path" -msgstr "Percorso" +msgid "Path*" +msgstr "Percorso*" msgctxt "#30068" msgid "Filter by servers" @@ -307,7 +307,7 @@ msgstr "Il film "%s" è stato aggiunto alla videoteca" msgctxt "#30136" msgid "Original version" -msgstr "Versione Originale" +msgstr "Versione originale" msgctxt "#30137" msgid "Direct" @@ -1562,8 +1562,8 @@ msgid "Information" msgstr "Informazione" msgctxt "#60349" -msgid "Go to the Main Menu" -msgstr "Andare al Menu Principale" +msgid "Go to the main menu" +msgstr "Andare al menù principale" msgctxt "#60350" msgid "Search in other channels" @@ -1582,36 +1582,36 @@ msgid "Add movie to video library" msgstr "Aggiungi film alla videoteca" msgctxt "#60354" -msgid "Download Movie" -msgstr "Scarica Film" +msgid "Download movie" +msgstr "Scarica film" msgctxt "#60355" msgid "Download TV show" msgstr "Scarica serie TV" msgctxt "#60356" -msgid "Download Episode" -msgstr "Scarica Episodio" +msgid "Download episode" +msgstr "Scarica episodio" msgctxt "#60357" -msgid "Download Season" -msgstr "Scarica Stagione" +msgid "Download season" +msgstr "Scarica stagione" msgctxt "#60358" -msgid "Open Configuration" -msgstr "Apri Configurazione" +msgid "Open configuration" +msgstr "Apri configurazione" msgctxt "#60359" -msgid "Search Trailer" -msgstr "Cerca Trailer" +msgid "Search trailer" +msgstr "Cerca trailer" msgctxt "#60360" msgid "Show quick menu" -msgstr "Mostra menu rapido" +msgstr "Mostra menù rapido" msgctxt "#60361" -msgid "Super Favourites Menu" -msgstr "Super Favourites Menu" +msgid "Super favourites menu" +msgstr "Menù super favoriti" msgctxt "#60362" msgid "You can't watch this video because..." @@ -1818,8 +1818,8 @@ msgid "Channels included in the global search " msgstr "Canali inclusi nella ricerca globale: " msgctxt "#60422" -msgid "Search " -msgstr "Ricerca " +msgid "Channels search" +msgstr "Ricerca canali" msgctxt "#60423" msgid "Search" @@ -2391,7 +2391,7 @@ msgstr "Ripristina videoteca (strm, nfo e json)" msgctxt "#60568" msgid "Search for new episodes and update video library" -msgstr "Cerca nuovi episodi e aggiorna videoteca" +msgstr "Cerca nuovi episodi ed aggiorna videoteca" msgctxt "#60569" msgid " - There are no default settings" @@ -2850,8 +2850,8 @@ msgid "Reload" msgstr "Ricarica" msgctxt "#70009" -msgid "Classic Menu" -msgstr "Menu Principale" +msgid "Main menu" +msgstr "Menù principale" msgctxt "#70010" msgid "Where To Search" @@ -2926,8 +2926,8 @@ msgid "Search engine settings" msgstr "Impostazioni motori di ricerca" msgctxt "#70028" -msgid "Most Popular" -msgstr "Più Popolari" +msgid "Most popular" +msgstr "Più popolari" msgctxt "#70029" msgid "Top rated" @@ -3214,7 +3214,7 @@ msgid "Video library %s configured" msgstr "Videoteca %s configurata" msgctxt "#70104" -msgid "The Kodi video library has been configured correctly" +msgid "The Kodi video library has been successfully configured" msgstr "La libreria di Kodi è stata configurata correttamente" msgctxt "#70105" @@ -3270,16 +3270,16 @@ msgid "Confirm new password" msgstr "Conferma nuova password" msgctxt "#70118" -msgid "TV shows folder" -msgstr "Cartella serie TV" +msgid "TV shows folder*" +msgstr "Cartella serie TV*" msgctxt "#70119" -msgid "Movies folder" -msgstr "Cartella film" +msgid "Movies folder*" +msgstr "Cartella film*" msgctxt "#70120" -msgid "Add KoD content to Kodi video library" -msgstr "Aggiungi i contenuti di KoD alla videoteca di Kodi" +msgid "Add KoD content to Kodi video library*" +msgstr "Aggiungi i contenuti di KoD alla videoteca di Kodi*" msgctxt "#70121" msgid "Activate" @@ -3406,12 +3406,12 @@ msgid "Show ExtendedInfo" msgstr "Mostra ExtendedInfo" msgctxt "#70153" -msgid "KoD shortcut" -msgstr "Scorciatoia KoD" +msgid "Shortcut" +msgstr "Scorciatoia" msgctxt "#70154" -msgid "TMDB search options" -msgstr "Opzioni di ricerca TMDB" +msgid "TMDB search" +msgstr "Ricerca TMDB" msgctxt "#70155" msgid "Simultaneous searches" @@ -5002,16 +5002,16 @@ msgid "Select color:" msgstr "Seleziona colore:" msgctxt "#70559" -msgid "Now in Theatres " -msgstr "Oggi in Sala" +msgid "Now in theatres " +msgstr "Oggi in sala" msgctxt "#70560" -msgid "Movies by Genre" +msgid "Movies by genre" msgstr "Per genere" msgctxt "#70561" -msgid "Search Similar" -msgstr "Cerca Simili" +msgid "Search similar" +msgstr "Cerca simili" msgctxt "#70562" msgid "Enable AutoPlay on all supported channels" @@ -5082,8 +5082,8 @@ msgid "Torrents" msgstr "Torrent" msgctxt "#70579" -msgid "KoD update" -msgstr "Aggiornamento KoD" +msgid "Updates" +msgstr "Aggiornamenti" msgctxt "#70580" msgid "Server answer timeout (seconds)" @@ -5478,8 +5478,8 @@ msgid "KoD updates" msgstr "Aggiornamenti KoD" msgctxt "#70675" -msgid "Error checking updates" -msgstr "Errore durante il controllo degli aggiornamenti" +msgid "Impossible to check the updates" +msgstr "Impossibile controllare gli aggiornamenti" msgctxt "#70676" msgid "Add a channel" @@ -5630,12 +5630,12 @@ msgid "Modify " msgstr "Modifica " msgctxt "#70715" -msgid "Customized homepage" -msgstr "Homepage personalizzata" +msgid "Customized main menu" +msgstr "Menù principale personalizzato" msgctxt "#70716" -msgid "Homepage categories" -msgstr "Categorie homepage" +msgid "Main menu items" +msgstr "Elementi menù principale" msgctxt "#70717" msgid "Are all the special episodes present?" @@ -5719,7 +5719,7 @@ msgstr "Serie TV completa" msgctxt "#70737" msgid "Show side menu" -msgstr "Mostra menu laterale" +msgstr "Mostra menù laterale" msgctxt "#70738" msgid "Ready channels %d/%d" @@ -5786,8 +5786,8 @@ msgid "Playback" msgstr "Riproduzione" msgctxt "#70754" -msgid "Display mode" -msgstr "Modalità visualizzazione" +msgid "View types" +msgstr "Tipi di vista" msgctxt "#70755" msgid "Default" @@ -5913,11 +5913,27 @@ msgctxt "#70785" msgid "Install Quasar" msgstr "Installa Quasar" +msgctxt "#70786" +msgid "Autostart" +msgstr "Avvio automatico" + +msgctxt "#70787" +msgid "Network" +msgstr "Rete" + +msgctxt "#70788" +msgid "Logging" +msgstr "Logging" + +msgctxt "#70789" +msgid "* Change by opening the settings from the main menu of KoD" +msgstr "* Cambia aprendo le impostazioni dal menù principale di KoD" + # DNS start [ settings and declaration ] msgctxt "#707401" -msgid "Enable DNS Check Alert" -msgstr "Abilita Avviso Check DNS" +msgid "Enable DNS check alert" +msgstr "Abilita avviso check DNS" msgctxt "#707402" msgid "Connection or DNS problems" @@ -6140,16 +6156,16 @@ msgid "Folder name for TV shows" msgstr "Nome della cartella per le serie TV" msgctxt "#80022" -msgid "You can configure the Kodi video library later from the Settings menu inside KoD" -msgstr "Potrai configurare la libreria di Kodi in seguito dal menu Impostazioni all'interno di KoD" +msgid "You can configure the Kodi video library later from the settings menu inside KoD" +msgstr "Potrai configurare la libreria di Kodi in seguito dal menu impostazioni all'interno di KoD" msgctxt "#80023" msgid "You will be asked to choose and configure the information providers for movies and TV shows" msgstr "Ti verrà chiesto di scegliere e configurare i provider delle informazioni per film e serie TV" msgctxt "#80024" -msgid "An error has occurred during the configuration of the Kodi video library. Please check the log and try again from the Settings menu inside KoD" -msgstr "Si è verificato un errore durante la configurazione della libreria di Kodi. Si prega di controllare il log e riprovare dal menu Impostazioni all'interno di KoD" +msgid "An error has occurred during the configuration of the Kodi video library. Please check the log and try again from the settings menu inside KoD" +msgstr "Si è verificato un errore durante la configurazione della libreria di Kodi. Si prega di controllare il log e riprovare dal menu impostazioni all'interno di KoD" msgctxt "#80025" msgid "Cleaning database..." diff --git a/resources/settings.xml b/resources/settings.xml index 0a257bb7..1b697b46 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -2,15 +2,15 @@ + - - - - - - - + + + + + + @@ -28,16 +28,17 @@ - + + - + @@ -46,79 +47,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -140,18 +71,14 @@ - - - - - - - - - - - - + + + + + + + + @@ -159,14 +86,79 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 3ad0489eb2159cf00b501dd3887ceccfcb319b14 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Wed, 8 Apr 2020 19:32:27 +0200 Subject: [PATCH 2/5] Fix Spostamento in videoteca --- specials/downloads.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/specials/downloads.py b/specials/downloads.py index 76c7c56c..4069b314 100644 --- a/specials/downloads.py +++ b/specials/downloads.py @@ -341,18 +341,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(config.get_setting("downloadpath"), item.downloadFilename) @@ -382,6 +379,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))) @@ -808,7 +806,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 From 93fa9c0156a80be97c5c822b6f8cb97e465c7606 Mon Sep 17 00:00:00 2001 From: Alhaziel01 Date: Wed, 8 Apr 2020 20:31:05 +0200 Subject: [PATCH 3/5] Fix nomi serie CB01 --- channels/cineblog01.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels/cineblog01.py b/channels/cineblog01.py index fdce9082..33f542a5 100644 --- a/channels/cineblog01.py +++ b/channels/cineblog01.py @@ -152,7 +152,7 @@ def peliculas(item): action = 'findvideos' else: # debug = True - patron = r'div class="card-image">.*?(?P.*?)(?P<lang>(?:[Ss][Uu][Bb]-)?[Ii][Tt][Aa])?<\/a>.*?(?:<strong><span style="[^"]+">(?P<genre>[^<>0-9(]+)\((?P<year>[0-9]{4}).*?</(?:p|div)>(?P<plot>.*?))?</div' + patron = r'div class="card-image">.*?<img src="(?P<thumb>[^ ]+)" alt.*?<a href="(?P<url>[^ >]+)">(?P<title>.*?)(?: – (?:[SS]tagione \d|\d).*?)?(?P<lang>(?:[Ss][Uu][Bb]-)?[Ii][Tt][Aa])?<\/a>.*?(?:<strong><span style="[^"]+">(?P<genre>[^<>0-9(]+)\((?P<year>[0-9]{4}).*?</(?:p|div)>(?P<plot>.*?))?</div' action = 'episodios' item.contentType = 'tvshow' From 4fce7cc3af1c4ae7c8a2fee723c5e68581fc3c55 Mon Sep 17 00:00:00 2001 From: axlt2002 <axlt2002@yahoo.it> Date: Thu, 9 Apr 2020 01:16:54 +0200 Subject: [PATCH 4/5] Aggiunta verifica sui percorsi videoteca KoD / libreria Kodi --- core/videolibrarytools.py | 4 ++-- platformcode/xbmc_videolibrary.py | 22 ++++++++++++++++++++++ resources/language/English/strings.po | 4 ++++ resources/language/Italian/strings.po | 6 +++++- specials/videolibrary.py | 12 +++++++++++- 5 files changed, 44 insertions(+), 4 deletions(-) diff --git a/core/videolibrarytools.py b/core/videolibrarytools.py index 40292408..f2671ee2 100644 --- a/core/videolibrarytools.py +++ b/core/videolibrarytools.py @@ -28,9 +28,9 @@ VIDEOLIBRARY_PATH = config.get_videolibrary_path() MOVIES_PATH = filetools.join(VIDEOLIBRARY_PATH, FOLDER_MOVIES) TVSHOWS_PATH = filetools.join(VIDEOLIBRARY_PATH, FOLDER_TVSHOWS) -if not FOLDER_MOVIES or not FOLDER_TVSHOWS or not VIDEOLIBRARY_PATH \ +"""if not FOLDER_MOVIES or not FOLDER_TVSHOWS or not VIDEOLIBRARY_PATH \ or not filetools.exists(MOVIES_PATH) or not filetools.exists(TVSHOWS_PATH): - config.verify_directories_created() + config.verify_directories_created()""" addon_name = "plugin://plugin.video.%s/" % config.PLUGIN_NAME diff --git a/platformcode/xbmc_videolibrary.py b/platformcode/xbmc_videolibrary.py index 5377e848..8e5219d8 100644 --- a/platformcode/xbmc_videolibrary.py +++ b/platformcode/xbmc_videolibrary.py @@ -1034,6 +1034,28 @@ def execute_sql_kodi(sql): return nun_records, records +def check_sources(new_movies_path='', new_tvshows_path=''): + logger.info() + + try: + SOURCES_PATH = xbmc.translatePath("special://userdata/sources.xml") + if filetools.isfile(SOURCES_PATH): + xmldoc = minidom.parse(SOURCES_PATH) + + # collect nodes + # nodes = xmldoc.getElementsByTagName("video") + video_node = xmldoc.childNodes[0].getElementsByTagName("video")[0] + paths_node = video_node.getElementsByTagName("path") + + # check paths + list_path = [p.firstChild.data for p in paths_node] + if new_movies_path in list_path or new_tvshows_path in list_path: + return True + return False + except: + return True + + def update_sources(new='', old=''): logger.info() if new == old: return True diff --git a/resources/language/English/strings.po b/resources/language/English/strings.po index adcf1b0b..53aa07c6 100644 --- a/resources/language/English/strings.po +++ b/resources/language/English/strings.po @@ -6177,4 +6177,8 @@ msgstr "" msgctxt "#80027" msgid "You will be asked to configure The Movie Database for movies and The TVDB for TV shows" +msgstr "" + +msgctxt "#80028" +msgid "The path and/or the folders you selected are already used by the Kodi library. Please select other ones" msgstr "" \ No newline at end of file diff --git a/resources/language/Italian/strings.po b/resources/language/Italian/strings.po index 27b197b9..5bb90540 100644 --- a/resources/language/Italian/strings.po +++ b/resources/language/Italian/strings.po @@ -6177,4 +6177,8 @@ msgstr "Configurazione della libreria di Kodi" msgctxt "#80027" msgid "You will be asked to configure The Movie Database for movies and The TVDB for TV shows" -msgstr "Ti verrà chiesto di configurare The Movie Database per i film e The TVDB per le serie TV" \ No newline at end of file +msgstr "Ti verrà chiesto di configurare The Movie Database per i film e The TVDB per le serie TV" + +msgctxt "#80028" +msgid "The path and/or the folders you selected are already used by the Kodi library. Please select other ones" +msgstr "Il percorso e/o le cartelle selezionate sono già utilizzati dalla libreria di Kodi. Si prega di selezionarne altri" \ No newline at end of file diff --git a/specials/videolibrary.py b/specials/videolibrary.py index 6f406228..99ebc7b3 100644 --- a/specials/videolibrary.py +++ b/specials/videolibrary.py @@ -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) From 20846db182ff262b0f675f41b50dcac0c65d7e16 Mon Sep 17 00:00:00 2001 From: Alhaziel01 <alhaziel01@gmail.com> Date: Thu, 9 Apr 2020 10:25:18 +0200 Subject: [PATCH 5/5] Fix Wstream --- servers/wstream.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/servers/wstream.py b/servers/wstream.py index c80043ec..8a1b03ec 100644 --- a/servers/wstream.py +++ b/servers/wstream.py @@ -52,8 +52,11 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= keys = json.loads(data) for key in keys: - video_urls.append(['%s [%sp]' % (key['type'].replace('video/', ''), key['label']), - key['src'].replace('https', 'http') + '|' + _headers]) + if 'label' in key: + video_urls.append(['%s [%sp]' % (key['type'].replace('video/', ''), key['label']), + key['src'].replace('https', 'http') + '|' + _headers]) + else: + video_urls.append([key['src'].split('.')[-1], key['src'].replace('https', 'http') + '|' + _headers]) except: pass