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' 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/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/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 8546ac19..ff7e3874 100644 --- a/resources/language/English/strings.po +++ b/resources/language/English/strings.po @@ -76,15 +76,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" @@ -204,7 +204,7 @@ msgid "Unsopported Server" msgstr "" msgctxt "#30067" -msgid "Path" +msgid "Path*" msgstr "" msgctxt "#30068" @@ -1561,7 +1561,7 @@ msgid "Information" msgstr "" msgctxt "#60349" -msgid "Go to the Main Menu" +msgid "Go to the main menu" msgstr "" msgctxt "#60350" @@ -1581,7 +1581,7 @@ msgid "Add movie to video library" msgstr "" msgctxt "#60354" -msgid "Download Movie" +msgid "Download movie" msgstr "" msgctxt "#60355" @@ -1589,19 +1589,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" @@ -1609,7 +1609,7 @@ msgid "Show quick menu" msgstr "" msgctxt "#60361" -msgid "Super Favourites Menu" +msgid "Super favourites menu" msgstr "" msgctxt "#60362" @@ -1817,8 +1817,8 @@ msgid "Channels included in the global search " msgstr "" msgctxt "#60422" -msgid "Search " -msgstr "" +msgid "Channels search" +msgstr "Ricerca canali" msgctxt "#60423" msgid "Search" @@ -2849,7 +2849,7 @@ msgid "Reload" msgstr "" msgctxt "#70009" -msgid "Classic Menu" +msgid "Main menu" msgstr "" msgctxt "#70010" @@ -2925,7 +2925,7 @@ msgid "Search engine settings" msgstr "" msgctxt "#70028" -msgid "Most Popular" +msgid "Most popular" msgstr "" msgctxt "#70029" @@ -3213,7 +3213,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" @@ -3269,15 +3269,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" @@ -3405,11 +3405,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" @@ -5001,15 +5001,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" @@ -5081,7 +5081,7 @@ msgid "Torrents" msgstr "" msgctxt "#70579" -msgid "KoD update" +msgid "Updates" msgstr "" msgctxt "#70580" @@ -5476,7 +5476,7 @@ msgid "KoD updates" msgstr "" msgctxt "#70675" -msgid "Error checking updates" +msgid "Impossible to check the updates" msgstr "" msgctxt "#70676" @@ -5628,11 +5628,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" @@ -5784,7 +5784,7 @@ msgid "Playback" msgstr "" msgctxt "#70754" -msgid "Display mode" +msgid "View types" msgstr "" msgctxt "#70755" @@ -5911,14 +5911,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" @@ -6159,4 +6175,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 edac832a..c731831f 100644 --- a/resources/language/Italian/strings.po +++ b/resources/language/Italian/strings.po @@ -76,16 +76,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" @@ -105,7 +105,7 @@ msgstr "NO" msgctxt "#30024" msgid "Contextual menu" -msgstr "Menu contestuale" +msgstr "Menù contestuale" msgctxt "#30025" msgid "Show KoD settings" @@ -204,8 +204,8 @@ msgid "Unsopported Server" msgstr "Server non supportato" msgctxt "#30067" -msgid "Path" -msgstr "Percorso" +msgid "Path*" +msgstr "Percorso*" msgctxt "#30068" msgid "Filter by servers" @@ -305,7 +305,7 @@ msgstr "Il film "%s" è stato aggiunto alla videoteca" msgctxt "#30136" msgid "Original version" -msgstr "Versione Originale" +msgstr "Versione originale" msgctxt "#30137" msgid "Direct" @@ -1560,8 +1560,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" @@ -1580,36 +1580,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..." @@ -1816,8 +1816,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" @@ -2389,7 +2389,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" @@ -2848,8 +2848,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" @@ -2924,8 +2924,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" @@ -3212,7 +3212,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" @@ -3268,16 +3268,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" @@ -3404,12 +3404,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" @@ -5000,16 +5000,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" @@ -5080,8 +5080,8 @@ msgid "Torrents" msgstr "Torrent" msgctxt "#70579" -msgid "KoD update" -msgstr "Aggiornamento KoD" +msgid "Updates" +msgstr "Aggiornamenti" msgctxt "#70580" msgid "Server answer timeout (seconds)" @@ -5476,8 +5476,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" @@ -5628,12 +5628,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?" @@ -5717,7 +5717,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" @@ -5784,8 +5784,8 @@ msgid "Playback" msgstr "Riproduzione" msgctxt "#70754" -msgid "Display mode" -msgstr "Modalità visualizzazione" +msgid "View types" +msgstr "Tipi di vista" msgctxt "#70755" msgid "Default" @@ -5911,11 +5911,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" @@ -6138,16 +6154,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..." @@ -6159,4 +6175,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/resources/settings.xml b/resources/settings.xml index 805837cb..1b697b46 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -2,14 +2,15 @@ <settings> <!-- General --> <category label="70168"> + <setting label="70786" type="lsep"/> <setting id="autostart" type="action" label="70706" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAiYXV0b3N0YXJ0IiwNCiAgICAiY2hhbm5lbCI6ICJzZXR0aW5nIg0KfQ==)" default="Off"/> - <setting type="sep"/> - <setting id="thumbnail_type" type="select" lvalues="30011|30012|30200" label="30010" default="2"/> - <setting id="channel_language" type="select" values="auto|all|ita" label="30019" default="all"/> - <setting id="forceview" type="bool" label="30043" default="false"/> - <setting type="sep"/> - <setting id="trakt_sync" type="bool" label="70109" default="false"/> + <setting label="70579" type="lsep"/> + <setting id="addon_update_enabled" type="bool" label="70581" default="true"/> + <setting id="addon_update_message" type="bool" label="70582" default="true"/> + <setting id="addon_update_timer" type="slider" option="int" range="1,1,24" label="707416" default="1"/> + <setting label="70787" type="lsep"/> <setting id="resolver_dns" type="bool" label="707408" default="true" enable="true" visible="true"/> + <setting label="70788" type="lsep"/> <setting id="debug" type="bool" label="30003" default="false"/> </category> @@ -27,16 +28,17 @@ <category label="30131"> <setting label="30501" type="lsep"/> <!-- <setting id="videolibrarypath" type="action" label="30067" action="RunPlugin(plugin://plugin.video.kod/?ew0KCSJjaGFubmVsIjoibW92ZV92aWRlb2xpYnJhcnkiLA0KCSJhY3Rpb24iOiJzZXRfdmlkZW9saWJyYXJ5X3BhdGgiDQp9)" default="special://profile/addon_data/plugin.video.kod/videolibrary"/> --> - <setting id="videolibrarypath" type="folder" label="30067" default="special://profile/addon_data/plugin.video.kod/videolibrary" option="writeable"/> + <setting id="videolibrarypath" type="folder" label="30067" default="special://profile/addon_data/plugin.video.kod/videolibrary/" option="writeable"/> <setting id="folder_tvshows" type="text" label="70118" default="Serie TV"/> <setting id="folder_movies" type="text" label="70119" default="Film"/> <setting id="videolibrary_kodi" type="bool" label="70120" default="false"/> + <setting id="settings_kod" type="text" label="70789"/> <setting label="59997" type="lsep"/> <setting id="videolibrary_max_quality" type="bool" label="70729" default="false" visible="true"/> <setting id="next_ep" type="select" label="70746" lvalues="70752|70747|70748" default="0"/> <setting id="next_ep_type" type="select" label="70754" lvalues="70755|70756|70757" default="0" visible="eq(-1,2)" subsetting="true"/> <setting id="next_ep_seconds" type="slider" option="int" range="20,10,120" label="70749" default="40" visible="!eq(-2,0)" subsetting="true"/> - + <setting id="trakt_sync" type="bool" label="70109" default="false"/> <setting label="30030" type="lsep"/> <setting id="vidolibrary_preferences" type="action" label="60542" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAiY2hhbm5lbF9jb25maWciLA0KICAgICJjaGFubmVsIjogInZpZGVvbGlicmFyeSINCn0==)"/> <setting id="vidolibrary_export" type="action" label="80000" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAiZXhwb3J0X3ZpZGVvbGlicmFyeSIsDQogICAgImNoYW5uZWwiOiAiYmFja3VwIg0KfQ==)"/> @@ -45,79 +47,9 @@ <setting id="vidolibrary_update" type="action" label="60568" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAidXBkYXRlX3ZpZGVvbGlicmFyeSIsDQogICAgImNoYW5uZWwiOiAidmlkZW9saWJyYXJ5Ig0KfQ==)"/> </category> - <!-- Search --> - <category label="60423"> - <setting id="last_search" type="bool" label="60678" default="true" visible="true"/> - <setting id="saved_searches_limit" type="slider" option="int" range="10,10,40" label="60677" default="10" visible="eq(-1,0)" subsetting="true"/> - <setting id="result_mode" type="select" label="60657" lvalues="60675|60676" default="0"/> - <setting id="thread_number" type="slider" label="60673" option="int" range="0,1,64" default="0"/> - <setting id="search_channels" type="action" label="59994" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJvcGNpb25lcyIsDQogICAgImNoYW5uZWwiOiJzZWFyY2giDQp9)"/> - </category> - - <!-- Downloads --> - <category label="30153"> - <setting id="downloadenabled" type="bool" label="70689" default="false"/> - <setting id="downloadpath" type="folder" label="30017" visible="eq(-1,true)" default="special://profile/addon_data/plugin.video.kod/downloads" subsetting="true" option="writeable"/> - <setting id="downloadlistpath" type="folder" label="30018" visible="eq(-2,true)" default="special://profile/addon_data/plugin.video.kod/downloads/list" subsetting="true"/> - <setting id="library_add" type="bool" label="70230" default="false"/> - <setting id="library_move" type="bool" label="70231" default="false" visible="eq(-1,true)" subsetting="true"/> - <setting id="browser" type="bool" label="70232" default="true"/> - <setting id="server_speed" type="bool" label="70242" default="true"/> - <setting id="quality" type="select" label="70240" lvalues="70241|70763|70764|70765" default="0"/> - <setting id="download_adv" type="action" label="30030" action="RunPlugin(plugin://plugin.video.kod/?ew0KCSJhY3Rpb24iOiJjaGFubmVsX2NvbmZpZyIsDQoJImNvbmZpZyI6ImRvd25sb2FkcyIsDQogICAgImNoYW5uZWwiOiJzZXR0aW5nIg0KfQ==)"/> - </category> - - <!-- News --> - <category label="60327"> - <setting label="60525" type="lsep"/> - <setting id="news_films" type="action" label="60509" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZXR0aW5nX2NoYW5uZWwiLA0KICAgICJjaGFubmVsIjoibmV3cyIsDQoJImV4dHJhIjoicGVsaWN1bGFzIg0KfQ==)"/> - <setting id="news_series" type="action" label="60511" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZXR0aW5nX2NoYW5uZWwiLA0KICAgICJjaGFubmVsIjoibmV3cyIsDQoJImV4dHJhIjoic2VyaWVzIg0KfQ==)"/> - <setting id="news_anime" type="action" label="60512" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZXR0aW5nX2NoYW5uZWwiLA0KICAgICJjaGFubmVsIjoibmV3cyIsDQoJImV4dHJhIjoiYW5pbWUiDQp9)"/> - <setting id="news_documentaries" type="action" label="60513" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZXR0aW5nX2NoYW5uZWwiLA0KICAgICJjaGFubmVsIjoibmV3cyIsDQoJImV4dHJhIjoiZG9jdW1lbnRhbGVzIg0KfQ==)"/> - <setting type="lsep"/> - <setting id="news_options" type="action" label="60415" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZXR0aW5ncyIsDQogICAgImNoYW5uZWwiOiJuZXdzIg0KfQ==)"/> - </category> - - <!-- Customization --> - <category label="70126"> - <setting id="icon_set" type="select" label="70108" values="default|light|dark|alfa|mike" default="default"/> - <setting id="enable_custom_theme" type="bool" label="70564" default="false"/> - <setting id="custom_theme" type="folder" label="70565" default="" visible="eq(-1,true)"/> - <setting id="video_thumbnail_type" type="select" label="70131" lvalues="70132|70133" default="1"/> - <!-- View Mode--> - <setting label="70754" type="lsep"/> - <setting id="skin_name" label='Skin Name' type="text" default="skin.estuary" visible="false"/> - <setting id="view_mode_addon" type="action" label="70009" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJ2aWV3X21vZGUiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkidHlwZSI6ImFkZG9uIg0KfQ==)" default= "Default, 0"/> - <setting id="view_mode_channel" type="action" label="30118" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJ2aWV3X21vZGUiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkidHlwZSI6ImNoYW5uZWwiDQp9)" default= "Default, 0"/> - <setting id="view_mode_movie" type="action" label="30122" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJ2aWV3X21vZGUiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkidHlwZSI6Im1vdmllIg0KfQ==)" default= "Default, 0"/> - <setting id="view_mode_tvshow" type="action" label="30123" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJ2aWV3X21vZGUiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkidHlwZSI6InR2c2hvdyINCn0=)" default= "Default, 0"/> - <setting id="view_mode_season" type="action" label="30140" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJ2aWV3X21vZGUiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkidHlwZSI6InNlYXNvbiINCn0=)" default= "Default, 0"/> - <setting id="view_mode_episode" type="action" label="70362" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJ2aWV3X21vZGUiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkidHlwZSI6ImVwaXNvZGUiDQp9)" default= "Default, 0"/> - <setting id="view_mode_server" type="action" label="70145" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJ2aWV3X21vZGUiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkidHlwZSI6InNlcnZlciINCn0=)" default= "Default, 0"/> - <!-- Contextual --> - <setting label="30024" type="lsep"/> - <setting id="quick_menu" type="bool" label="60360" default="false"/> - <setting id="side_menu" type="bool" label="70737" default="false"/> - <setting id="kod_menu" type="bool" label="30025" default="false"/> - <!-- Homepage --> - <setting label="70716" type="lsep"/> - <setting id="enable_news_menu" label="30130" type="bool" default="true"/> - <setting id="enable_channels_menu" label="30118" type="bool" default="true"/> - <setting id="enable_search_menu" label="30103" type="bool" default="true"/> - <setting id="enable_onair_menu" label="50001" type="bool" default="true"/> - <setting id="enable_link_menu" label="70527" type="bool" default="true"/> - <setting id="enable_fav_menu" label="30102" type="bool" default="true"/> - <setting id="enable_library_menu" label="30131" type="bool" default="true"/> - <!-- Custom Start --> - <setting label="70715" type="lsep"/> - <setting id="start_page" type="bool" label="70121" default="false"/> - <setting id="custom_start" type="bool" label="70122" default="false" visible="eq(-1,True)" enable="eq(-1,True)+eq(1,False)" subsetting="true"/> - <setting id="news_start" type="bool" label="70123" default="false" visible="eq(-2,True)" enable="eq(-1,False)+eq(-2,True)" subsetting="true"/> - <setting id="category" type="action" label="70124" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZWxlY3QiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkiaWQiOiJjYXRlZ29yeSIsDQoJInR5cGUiOiJsYWJlbHMiLA0KCSJ2YWx1ZXMiOiI3MDEzN3wzMDEyM3wzMDEyNHw2MDUxMyIsDQoJImxhYmVsIjoiNzAxMjQiDQp9)" visible="eq(-3,True)+eq(-1,True)+eq(-2,False)" enable="eq(-3,True)+eq(-1,True)+eq(-2,False)" subsetting="true"/> - <!-- <setting id="category" type="select" label="70124" lvalues="70137|30123|30124|60513" default="Film" visible="eq(-3,True)+eq(-1,True)+eq(-2,False)" enable="eq(-3,True)+eq(-1,True)+(-2,false)"/> --> - </category> - + <!-- Channels --> <category label="30118" > + <setting id="channel_language" type="select" values="auto|all|ita" label="30019" default="all"/> <setting id="channels_onoff" type="action" label="60545" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAiY29uZl90b29scyIsDQogICAgImNoYW5uZWwiOiAic2V0dGluZyIsDQoJImV4dHJhIjogImNoYW5uZWxzX29ub2ZmIg0KfQ==)"/> <setting id="channels_config" type="action" label="60537" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAiY2hhbm5lbHNfbWVudSIsDQogICAgImNoYW5uZWwiOiAic2hvcnRjdXRzIg0KfQ==)"/> <setting id="channels_check" type="action" label="60549" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAiY2hlY2tfY2hhbm5lbHMiLA0KICAgICJjaGFubmVsIjogInNob3J0Y3V0cyINCn0==)"/> @@ -139,18 +71,14 @@ <setting id="quasar_install" type="action" label="70785" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJkb3dubG9hZCIsDQogICAgImNoYW5uZWwiOiJxdWFzYXJfZG93bmxvYWQiDQp9)"/> </category> - <!-- Other --> - <category label="70149"> - <setting label="70150" type="lsep"/> - <setting id="infoplus" type="bool" label="70151" default="false"/> - <setting id="infoplus_set" type="bool" label="70128" visible="eq(-1,true)" default="false" subsetting="true"/> - <setting id="extended_info" type="bool" label="70152" default="false"/> - - <setting label="70153" type="lsep"/> - <setting id="shortcut_key" type="action" label="30999" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAia2V5bWFwIg0KfQ==)"/> - <setting id="delete_key" type="action" label="31000" action="RunPlugin(plugin://plugin.video.kod/?ewogICAgImFjdGlvbiI6ICJkZWxldGVfa2V5Igp9==)"/> - - + <!-- Search --> + <category label="60423"> + <setting label="60422" type="lsep"/> + <setting id="last_search" type="bool" label="60678" default="true" visible="true"/> + <setting id="saved_searches_limit" type="slider" option="int" range="10,10,40" label="60677" default="10" visible="eq(-1,0)" subsetting="true"/> + <setting id="result_mode" type="select" label="60657" lvalues="60675|60676" default="0"/> + <setting id="thread_number" type="slider" label="60673" option="int" range="0,1,64" default="0"/> + <setting id="search_channels" type="action" label="59994" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJvcGNpb25lcyIsDQogICAgImNoYW5uZWwiOiJzZWFyY2giDQp9)"/> <setting label="70154" type="lsep"/> <setting id="tmdb_active" default="true" visible="false"/> <setting id="tmdb_threads" type="slider" option="int" range="5,5,30" label="70155" default="20"/> @@ -158,14 +86,79 @@ <setting id="tmdb_cache" type="bool" label="70157" default="true"/> <setting id="tmdb_cache_expire" type="select" lvalues="70158|70159|70160|70161|70170" label="70162" enable="eq(-1,true)" default="4"/> <setting id="tmdb_clean_db_cache" type="action" label="70163" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAic2NyaXB0Ig0KfQ==)" /> - - <setting label="70579" type="lsep"/> - <setting id="addon_update_enabled" type="bool" label="70581" default="true"/> - <setting id="addon_update_message" type="bool" label="70582" default="true"/> - <setting id="addon_update_timer" type="slider" option="int" range="1,1,24" label="707416" default="1"/> - <setting label="Lista activa" type="text" id="lista_activa" default="kodfavorites-default.json" visible="false"/> + </category> + <!-- Downloads --> + <category label="30153"> + <setting id="downloadenabled" type="bool" label="70689" default="false"/> + <setting id="downloadpath" type="folder" label="30017" visible="eq(-1,true)" default="special://profile/addon_data/plugin.video.kod/downloads/" subsetting="true" option="writeable"/> + <setting id="downloadlistpath" type="folder" label="30018" visible="eq(-2,true)" default="special://profile/addon_data/plugin.video.kod/downloads/list/" subsetting="true"/> + <setting id="settings_kod1" type="text" label="70789" visible="eq(-3,true)"/> + <setting id="library_add" type="bool" label="70230" default="false"/> + <setting id="library_move" type="bool" label="70231" default="false" visible="eq(-1,true)" subsetting="true"/> + <setting id="browser" type="bool" label="70232" default="true"/> + <setting id="server_speed" type="bool" label="70242" default="true"/> + <setting id="quality" type="select" label="70240" lvalues="70241|70763|70764|70765" default="0"/> + <setting id="download_adv" type="action" label="30030" action="RunPlugin(plugin://plugin.video.kod/?ew0KCSJhY3Rpb24iOiJjaGFubmVsX2NvbmZpZyIsDQoJImNvbmZpZyI6ImRvd25sb2FkcyIsDQogICAgImNoYW5uZWwiOiJzZXR0aW5nIg0KfQ==)"/> + </category> + + <!-- News --> + <category label="60327"> + <setting label="60525" type="lsep"/> + <setting id="news_films" type="action" label="60509" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZXR0aW5nX2NoYW5uZWwiLA0KICAgICJjaGFubmVsIjoibmV3cyIsDQoJImV4dHJhIjoicGVsaWN1bGFzIg0KfQ==)"/> + <setting id="news_series" type="action" label="60511" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZXR0aW5nX2NoYW5uZWwiLA0KICAgICJjaGFubmVsIjoibmV3cyIsDQoJImV4dHJhIjoic2VyaWVzIg0KfQ==)"/> + <setting id="news_anime" type="action" label="60512" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZXR0aW5nX2NoYW5uZWwiLA0KICAgICJjaGFubmVsIjoibmV3cyIsDQoJImV4dHJhIjoiYW5pbWUiDQp9)"/> + <setting id="news_documentaries" type="action" label="60513" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZXR0aW5nX2NoYW5uZWwiLA0KICAgICJjaGFubmVsIjoibmV3cyIsDQoJImV4dHJhIjoiZG9jdW1lbnRhbGVzIg0KfQ==)"/> + <setting id="news_options" type="action" label="60415" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZXR0aW5ncyIsDQogICAgImNoYW5uZWwiOiJuZXdzIg0KfQ==)"/> + </category> + + <!-- Customization --> + <category label="70126"> + <!-- Homepage --> + <setting label="70716" type="lsep"/> + <setting id="enable_news_menu" label="30130" type="bool" default="true"/> + <setting id="enable_channels_menu" label="30118" type="bool" default="true"/> + <setting id="enable_search_menu" label="30103" type="bool" default="true"/> + <setting id="enable_onair_menu" label="50001" type="bool" default="true"/> + <setting id="enable_link_menu" label="70527" type="bool" default="true"/> + <setting id="enable_fav_menu" label="30102" type="bool" default="true"/> + <setting id="enable_library_menu" label="30131" type="bool" default="true"/> + <!-- View Mode--> + <setting label="70754" type="lsep"/> + <setting id="skin_name" label='Skin Name' type="text" default="skin.estuary" visible="false"/> + <setting id="view_mode_addon" type="action" label="70009" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJ2aWV3X21vZGUiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkidHlwZSI6ImFkZG9uIg0KfQ==)" default= "Default, 0"/> + <setting id="view_mode_channel" type="action" label="30118" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJ2aWV3X21vZGUiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkidHlwZSI6ImNoYW5uZWwiDQp9)" default= "Default, 0"/> + <setting id="view_mode_movie" type="action" label="30122" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJ2aWV3X21vZGUiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkidHlwZSI6Im1vdmllIg0KfQ==)" default= "Default, 0"/> + <setting id="view_mode_tvshow" type="action" label="30123" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJ2aWV3X21vZGUiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkidHlwZSI6InR2c2hvdyINCn0=)" default= "Default, 0"/> + <setting id="view_mode_season" type="action" label="30140" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJ2aWV3X21vZGUiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkidHlwZSI6InNlYXNvbiINCn0=)" default= "Default, 0"/> + <setting id="view_mode_episode" type="action" label="70362" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJ2aWV3X21vZGUiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkidHlwZSI6ImVwaXNvZGUiDQp9)" default= "Default, 0"/> + <setting id="view_mode_server" type="action" label="70145" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJ2aWV3X21vZGUiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkidHlwZSI6InNlcnZlciINCn0=)" default= "Default, 0"/> + <!-- Contextual --> + <setting label="30024" type="lsep"/> + <setting id="quick_menu" type="bool" label="60360" default="false"/> + <setting id="side_menu" type="bool" label="70737" default="false"/> + <setting id="kod_menu" type="bool" label="30025" default="false"/> + <setting id="infoplus" type="bool" label="70151" default="false"/> + <setting id="infoplus_set" type="bool" label="70128" visible="eq(-1,true)" default="false" subsetting="true"/> + <setting id="extended_info" type="bool" label="70152" default="false"/> + <!-- Shortcut --> + <setting label="70153" type="lsep"/> + <setting id="shortcut_key" type="action" label="30999" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAia2V5bWFwIg0KfQ==)"/> + <setting id="delete_key" type="action" label="31000" action="RunPlugin(plugin://plugin.video.kod/?ewogICAgImFjdGlvbiI6ICJkZWxldGVfa2V5Igp9==)"/> + <!-- Custom Start --> + <setting label="70715" type="lsep"/> + <setting id="start_page" type="bool" label="70121" default="false"/> + <setting id="custom_start" type="bool" label="70122" default="false" visible="eq(-1,True)" enable="eq(-1,True)+eq(1,False)" subsetting="true"/> + <setting id="news_start" type="bool" label="70123" default="false" visible="eq(-2,True)" enable="eq(-1,False)+eq(-2,True)" subsetting="true"/> + <setting id="category" type="action" label="70124" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZWxlY3QiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkiaWQiOiJjYXRlZ29yeSIsDQoJInR5cGUiOiJsYWJlbHMiLA0KCSJ2YWx1ZXMiOiI3MDEzN3wzMDEyM3wzMDEyNHw2MDUxMyIsDQoJImxhYmVsIjoiNzAxMjQiDQp9)" visible="eq(-3,True)+eq(-1,True)+eq(-2,False)" enable="eq(-3,True)+eq(-1,True)+eq(-2,False)" subsetting="true"/> + <!-- <setting id="category" type="select" label="70124" lvalues="70137|30123|30124|60513" default="Film" visible="eq(-3,True)+eq(-1,True)+eq(-2,False)" enable="eq(-3,True)+eq(-1,True)+(-2,false)"/> --> + <!-- Others --> + <setting label="70149" type="lsep"/> + <setting id="icon_set" type="select" label="70108" values="default|light|dark|alfa|mike" default="default"/> + <setting id="enable_custom_theme" type="bool" label="70564" default="false"/> + <setting id="custom_theme" type="folder" label="70565" default="" visible="eq(-1,true)"/> + <setting id="video_thumbnail_type" type="select" label="70131" lvalues="70132|70133" default="1"/> </category> <!-- Adult --> 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 diff --git a/specials/downloads.py b/specials/downloads.py index eeb75366..8d0a1b1a 100644 --- a/specials/downloads.py +++ b/specials/downloads.py @@ -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 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)