Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -854,11 +854,13 @@ def save_episodes(path, episodelist, serie, silent=False, overwrite=True):
|
|||||||
return insertados, sobreescritos, fallidos
|
return insertados, sobreescritos, fallidos
|
||||||
|
|
||||||
|
|
||||||
def config_local_episodes_path(path, title):
|
def config_local_episodes_path(path, title, silent=False):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
local_episodes_path = ''
|
local_episodes_path = ''
|
||||||
if platformtools.dialog_yesno(config.get_localized_string(30131), config.get_localized_string(80044) % title):
|
if not silent:
|
||||||
|
silent = platformtools.dialog_yesno(config.get_localized_string(30131), config.get_localized_string(80044) % title)
|
||||||
|
if silent:
|
||||||
if config.is_xbmc() and not config.get_setting("videolibrary_kodi"):
|
if config.is_xbmc() and not config.get_setting("videolibrary_kodi"):
|
||||||
platformtools.dialog_ok(config.get_localized_string(30131), config.get_localized_string(80043))
|
platformtools.dialog_ok(config.get_localized_string(30131), config.get_localized_string(80043))
|
||||||
local_episodes_path = platformtools.dialog_browse(0, config.get_localized_string(80046))
|
local_episodes_path = platformtools.dialog_browse(0, config.get_localized_string(80046))
|
||||||
@@ -872,9 +874,10 @@ def config_local_episodes_path(path, title):
|
|||||||
|
|
||||||
if local_episodes_path:
|
if local_episodes_path:
|
||||||
# import artwork
|
# import artwork
|
||||||
|
artwork_extensions = ['.jpg', '.jpeg', '.png']
|
||||||
files = filetools.listdir(local_episodes_path)
|
files = filetools.listdir(local_episodes_path)
|
||||||
for file in files:
|
for file in files:
|
||||||
if file.endswith('.jpg') or file.endswith('.jpeg') or file.endswith('.png'):
|
if os.path.splitext(file)[1] in artwork_extensions:
|
||||||
filetools.copy(filetools.join(local_episodes_path, file), filetools.join(path, file))
|
filetools.copy(filetools.join(local_episodes_path, file), filetools.join(path, file))
|
||||||
|
|
||||||
return 0, local_episodes_path
|
return 0, local_episodes_path
|
||||||
@@ -883,22 +886,29 @@ def config_local_episodes_path(path, title):
|
|||||||
def process_local_episodes(local_episodes_path, path):
|
def process_local_episodes(local_episodes_path, path):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
|
sub_extensions = ['.srt', '.sub', '.sbv', '.ass', '.idx', '.ssa', '.smi']
|
||||||
|
artwork_extensions = ['.jpg', '.jpeg', '.png']
|
||||||
|
extensions = sub_extensions + artwork_extensions
|
||||||
|
|
||||||
local_episodes_list = []
|
local_episodes_list = []
|
||||||
|
files_list = []
|
||||||
for root, folders, files in filetools.walk(local_episodes_path):
|
for root, folders, files in filetools.walk(local_episodes_path):
|
||||||
for file in files:
|
for file in files:
|
||||||
|
if os.path.splitext(file)[1] in extensions:
|
||||||
|
continue
|
||||||
season_episode = scrapertools.get_season_and_episode(file)
|
season_episode = scrapertools.get_season_and_episode(file)
|
||||||
if season_episode == "":
|
if season_episode == "":
|
||||||
continue
|
continue
|
||||||
local_episodes_list.append(season_episode)
|
local_episodes_list.append(season_episode)
|
||||||
|
files_list.append(file)
|
||||||
|
|
||||||
local_episodes_list = sorted(set(local_episodes_list))
|
|
||||||
|
|
||||||
nfo_path = filetools.join(path, "tvshow.nfo")
|
nfo_path = filetools.join(path, "tvshow.nfo")
|
||||||
head_nfo, item_nfo = read_nfo(nfo_path)
|
head_nfo, item_nfo = read_nfo(nfo_path)
|
||||||
|
|
||||||
# if a local episode has been added, overwrites the strm
|
# if a local episode has been added, overwrites the strm
|
||||||
for season_episode in set(local_episodes_list).difference(item_nfo.local_episodes_list):
|
for season_episode, file in zip(local_episodes_list, files_list):
|
||||||
filetools.write(filetools.join(path, season_episode + '.strm'), filetools.join(root, file))
|
if not season_episode in item_nfo.local_episodes_list:
|
||||||
|
filetools.write(filetools.join(path, season_episode + '.strm'), filetools.join(root, file))
|
||||||
|
|
||||||
# if a local episode has been removed, deletes the strm
|
# if a local episode has been removed, deletes the strm
|
||||||
for season_episode in set(item_nfo.local_episodes_list).difference(local_episodes_list):
|
for season_episode in set(item_nfo.local_episodes_list).difference(local_episodes_list):
|
||||||
@@ -907,8 +917,8 @@ def process_local_episodes(local_episodes_path, path):
|
|||||||
# updates the local episodes path and list in the nfo
|
# updates the local episodes path and list in the nfo
|
||||||
if not local_episodes_list:
|
if not local_episodes_list:
|
||||||
item_nfo.local_episodes_path = ''
|
item_nfo.local_episodes_path = ''
|
||||||
item_nfo.local_episodes_list = local_episodes_list
|
item_nfo.local_episodes_list = sorted(set(local_episodes_list))
|
||||||
|
|
||||||
filetools.write(nfo_path, head_nfo + item_nfo.tojson())
|
filetools.write(nfo_path, head_nfo + item_nfo.tojson())
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ msgid "Password"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#30017"
|
msgctxt "#30017"
|
||||||
msgid "Download path*"
|
msgid "Download path"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#30018"
|
msgctxt "#30018"
|
||||||
@@ -204,7 +204,7 @@ msgid "Unsopported Server"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#30067"
|
msgctxt "#30067"
|
||||||
msgid "Path*"
|
msgid "Path"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#30068"
|
msgctxt "#30068"
|
||||||
@@ -3269,15 +3269,15 @@ msgid "Confirm new password"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#70118"
|
msgctxt "#70118"
|
||||||
msgid "TV shows folder*"
|
msgid "TV shows folder"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#70119"
|
msgctxt "#70119"
|
||||||
msgid "Movies folder*"
|
msgid "Movies folder"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#70120"
|
msgctxt "#70120"
|
||||||
msgid "Add KoD contents to Kodi video library*"
|
msgid "Add KoD contents to Kodi video library"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#70121"
|
msgctxt "#70121"
|
||||||
@@ -6217,7 +6217,7 @@ msgid "Folder name for TV shows"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#80022"
|
msgctxt "#80022"
|
||||||
msgid "You can configure the Kodi video library later from the settings menu inside KoD"
|
msgid "You can configure the Kodi video library later from the KoD settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#80023"
|
msgctxt "#80023"
|
||||||
@@ -6225,7 +6225,7 @@ msgid "You will be asked to choose and configure the information providers for m
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#80024"
|
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"
|
msgid "An error has occurred during the configuration of the Kodi video library. Please check the log and try again from the KoD settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#80025"
|
msgctxt "#80025"
|
||||||
@@ -6245,7 +6245,7 @@ msgid "The selected folders are already used by the Kodi library. Please change
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#80029"
|
msgctxt "#80029"
|
||||||
msgid "The selected folders are already used by the Kodi library. Please change them properly from the settings menu inside KoD"
|
msgid "The selected folders are already used by the Kodi library. Please change them properly from the KoD settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#80030"
|
msgctxt "#80030"
|
||||||
@@ -6301,7 +6301,7 @@ msgid "Include local episodes when adding a TV shows"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#80043"
|
msgctxt "#80043"
|
||||||
msgid "Attention, in order to watch local episodes you have to configure the Kodi video library from the settings menu inside KoD"
|
msgid "Attention, in order to watch local episodes you have to configure the Kodi video library from the KoD settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#80044"
|
msgctxt "#80044"
|
||||||
|
|||||||
@@ -76,8 +76,8 @@ msgid "Password"
|
|||||||
msgstr "Password"
|
msgstr "Password"
|
||||||
|
|
||||||
msgctxt "#30017"
|
msgctxt "#30017"
|
||||||
msgid "Download path*"
|
msgid "Download path"
|
||||||
msgstr "Percorso download*"
|
msgstr "Percorso download"
|
||||||
|
|
||||||
msgctxt "#30018"
|
msgctxt "#30018"
|
||||||
msgid "Download list path"
|
msgid "Download list path"
|
||||||
@@ -204,8 +204,8 @@ msgid "Unsopported Server"
|
|||||||
msgstr "Server non supportato"
|
msgstr "Server non supportato"
|
||||||
|
|
||||||
msgctxt "#30067"
|
msgctxt "#30067"
|
||||||
msgid "Path*"
|
msgid "Path"
|
||||||
msgstr "Percorso*"
|
msgstr "Percorso"
|
||||||
|
|
||||||
msgctxt "#30068"
|
msgctxt "#30068"
|
||||||
msgid "Filter by servers"
|
msgid "Filter by servers"
|
||||||
@@ -3268,16 +3268,16 @@ msgid "Confirm new password"
|
|||||||
msgstr "Conferma nuova password"
|
msgstr "Conferma nuova password"
|
||||||
|
|
||||||
msgctxt "#70118"
|
msgctxt "#70118"
|
||||||
msgid "TV shows folder*"
|
msgid "TV shows folder"
|
||||||
msgstr "Cartella serie TV*"
|
msgstr "Cartella serie TV"
|
||||||
|
|
||||||
msgctxt "#70119"
|
msgctxt "#70119"
|
||||||
msgid "Movies folder*"
|
msgid "Movies folder"
|
||||||
msgstr "Cartella film*"
|
msgstr "Cartella film"
|
||||||
|
|
||||||
msgctxt "#70120"
|
msgctxt "#70120"
|
||||||
msgid "Add KoD contents to Kodi video library*"
|
msgid "Add KoD contents to Kodi video library"
|
||||||
msgstr "Aggiungi la videoteca di KoD alla libreria di Kodi*"
|
msgstr "Aggiungi la videoteca di KoD alla libreria di Kodi"
|
||||||
|
|
||||||
msgctxt "#70121"
|
msgctxt "#70121"
|
||||||
msgid "Activate"
|
msgid "Activate"
|
||||||
@@ -6217,16 +6217,16 @@ msgid "Folder name for TV shows"
|
|||||||
msgstr "Nome della cartella per le serie TV"
|
msgstr "Nome della cartella per le serie TV"
|
||||||
|
|
||||||
msgctxt "#80022"
|
msgctxt "#80022"
|
||||||
msgid "You can configure the Kodi video library later from the settings menu inside KoD"
|
msgid "You can configure the Kodi video library later from the KoD settings"
|
||||||
msgstr "Potrai configurare la libreria di Kodi in seguito dal menu impostazioni all'interno di KoD"
|
msgstr "Potrai configurare la libreria di Kodi in seguito dalle impostazioni di KoD"
|
||||||
|
|
||||||
msgctxt "#80023"
|
msgctxt "#80023"
|
||||||
msgid "You will be asked to choose and configure the information providers for movies and TV shows"
|
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"
|
msgstr "Ti verrà chiesto di scegliere e configurare i provider delle informazioni per film e serie TV"
|
||||||
|
|
||||||
msgctxt "#80024"
|
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"
|
msgid "An error has occurred during the configuration of the Kodi video library. Please check the log and try again from the KoD settings"
|
||||||
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"
|
msgstr "Si è verificato un errore durante la configurazione della libreria di Kodi. Si prega di controllare il log e riprovare dalle impostazioni di KoD"
|
||||||
|
|
||||||
msgctxt "#80025"
|
msgctxt "#80025"
|
||||||
msgid "Cleaning database..."
|
msgid "Cleaning database..."
|
||||||
@@ -6245,8 +6245,8 @@ msgid "The selected folders are already used by the Kodi library. Please change
|
|||||||
msgstr "Le cartelle selezionate sono già utilizzate dalla libreria di Kodi. Si prega di cambiarle opportunamente"
|
msgstr "Le cartelle selezionate sono già utilizzate dalla libreria di Kodi. Si prega di cambiarle opportunamente"
|
||||||
|
|
||||||
msgctxt "#80029"
|
msgctxt "#80029"
|
||||||
msgid "The selected folders are already used by the Kodi library. Please change them properly from the settings menu inside KoD"
|
msgid "The selected folders are already used by the Kodi library. Please change them properly from the KoD settings"
|
||||||
msgstr "Le cartelle selezionate sono già utilizzate dalla libreria di Kodi. Si prega di cambiarle opportunamente dal menu impostazioni all'interno di KoD"
|
msgstr "Le cartelle selezionate sono già utilizzate dalla libreria di Kodi. Si prega di cambiarle opportunamente dalle impostazioni di KoD"
|
||||||
|
|
||||||
msgctxt "#80030"
|
msgctxt "#80030"
|
||||||
msgid "The default path and folders will be used. You will be asked to choose and configure the information providers for movies and TV shows"
|
msgid "The default path and folders will be used. You will be asked to choose and configure the information providers for movies and TV shows"
|
||||||
@@ -6301,8 +6301,8 @@ msgid "Include local episodes when adding a TV shows"
|
|||||||
msgstr "Includere episodi in locale all'aggiunta di una serie TV"
|
msgstr "Includere episodi in locale all'aggiunta di una serie TV"
|
||||||
|
|
||||||
msgctxt "#80043"
|
msgctxt "#80043"
|
||||||
msgid "Attention, in order to watch local episodes you have to configure the Kodi video library from the settings menu inside KoD"
|
msgid "Attention, in order to watch local episodes you have to configure the Kodi video library from the KoD settings"
|
||||||
msgstr "Attenzione, per guardare gli episodi in locale devi configurare la libreria di Kodi dal menu impostazioni all'interno di KoD"
|
msgstr "Attenzione, per guardare gli episodi in locale devi configurare la libreria di Kodi dalle impostazioni di KoD"
|
||||||
|
|
||||||
msgctxt "#80044"
|
msgctxt "#80044"
|
||||||
msgid "Do you want to include local episodes for the TV show "%s"?"
|
msgid "Do you want to include local episodes for the TV show "%s"?"
|
||||||
|
|||||||
@@ -96,12 +96,12 @@
|
|||||||
<setting id="downloadpath" type="folder" label="30017" visible="eq(-1,true)" default="special://profile/addon_data/plugin.video.kod/downloads/" option="writeable"/>
|
<setting id="downloadpath" type="folder" label="30017" visible="eq(-1,true)" default="special://profile/addon_data/plugin.video.kod/downloads/" option="writeable"/>
|
||||||
<!-- <setting id="library_add" type="bool" label="70230" default="false"/>
|
<!-- <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="library_move" type="bool" label="70231" default="false" visible="eq(-1,true)" subsetting="true"/> -->
|
||||||
<setting id="downloadlistpath" type="folder" label="30018" visible="eq(-3,true)" default="special://profile/addon_data/plugin.video.kod/downloads/list/" option="writeable"/>
|
<setting id="downloadlistpath" type="folder" label="30018" visible="eq(-2,true)" default="special://profile/addon_data/plugin.video.kod/downloads/list/" option="writeable"/>
|
||||||
<setting id="library_move" type="bool" label="70231" visible="eq(-4,true)" default="true"/>
|
<setting id="library_move" type="bool" label="70231" visible="eq(-3,true)" default="true"/>
|
||||||
<setting id="browser" type="bool" label="70232" visible="eq(-5,true)" default="true"/>
|
<setting id="browser" type="bool" label="70232" visible="eq(-4,true)" default="true"/>
|
||||||
<setting id="server_speed" type="bool" label="70242" visible="eq(-6,true)" default="true"/>
|
<setting id="server_speed" type="bool" label="70242" visible="eq(-5,true)" default="true"/>
|
||||||
<setting id="quality" type="select" label="70240" lvalues="70241|70763|70764|70765" visible="eq(-7,true)" default="0"/>
|
<setting id="quality" type="select" label="70240" lvalues="70241|70763|70764|70765" visible="eq(-6,true)" default="0"/>
|
||||||
<setting id="download_adv" type="action" label="30030" visible="eq(-8,true)" action="RunPlugin(plugin://plugin.video.kod/?ew0KCSJhY3Rpb24iOiJjaGFubmVsX2NvbmZpZyIsDQoJImNvbmZpZyI6ImRvd25sb2FkcyIsDQogICAgImNoYW5uZWwiOiJzZXR0aW5nIg0KfQ==)"/>
|
<setting id="download_adv" type="action" label="30030" visible="eq(-7,true)" action="RunPlugin(plugin://plugin.video.kod/?ew0KCSJhY3Rpb24iOiJjaGFubmVsX2NvbmZpZyIsDQoJImNvbmZpZyI6ImRvd25sb2FkcyIsDQogICAgImNoYW5uZWwiOiJzZXR0aW5nIg0KfQ==)"/>
|
||||||
|
|
||||||
<setting id="elementumtype" type="text" label="Elementum Download Type" visible="false"/>
|
<setting id="elementumtype" type="text" label="Elementum Download Type" visible="false"/>
|
||||||
<setting id="elementumdl" type="folder" label="Elementum Download Backup" visible="false"/>
|
<setting id="elementumdl" type="folder" label="Elementum Download Backup" visible="false"/>
|
||||||
|
|||||||
@@ -822,7 +822,7 @@ def update_tvshow(item):
|
|||||||
def add_local_episodes(item):
|
def add_local_episodes(item):
|
||||||
logger.info()
|
logger.info()
|
||||||
|
|
||||||
done, local_episodes_path = videolibrarytools.config_local_episodes_path(item.path, item.contentSerieName)
|
done, local_episodes_path = videolibrarytools.config_local_episodes_path(item.path, item.contentSerieName, silent=True)
|
||||||
if done < 0:
|
if done < 0:
|
||||||
logger.info("An issue has occurred while configuring local episodes")
|
logger.info("An issue has occurred while configuring local episodes")
|
||||||
elif local_episodes_path:
|
elif local_episodes_path:
|
||||||
|
|||||||
Reference in New Issue
Block a user