Ipostazioni Ragruppate

This commit is contained in:
Alhaziel
2020-03-07 19:04:08 +01:00
parent 516c74264f
commit 16d46acb7e
19 changed files with 487 additions and 253 deletions

View File

@@ -26,10 +26,14 @@ def getmainlist(view="thumb_"):
context = CONTEXT))
# Añade los canales que forman el menú principal
if addon.getSetting('enable_news_menu') == "true":
# itemlist.append(Item(title=config.get_localized_string(30130), channel="news", action="mainlist",
# thumbnail=get_thumb("news.png", view),
# category=config.get_localized_string(30119), viewmode="thumbnails",
# context=CONTEXT + [{"title": config.get_localized_string(70285), "channel": "news", "action": "menu_opciones","goto": True}]))
itemlist.append(Item(title=config.get_localized_string(30130), channel="news", action="mainlist",
thumbnail=get_thumb("news.png", view),
category=config.get_localized_string(30119), viewmode="thumbnails",
context=CONTEXT + [{"title": config.get_localized_string(70285), "channel": "news", "action": "menu_opciones","goto": True}]))
context=CONTEXT + [{"title": config.get_localized_string(70285), "channel": "shortcuts", "action": "SettingOnPosition", "category":5}]))
if addon.getSetting('enable_channels_menu') == "true":
itemlist.append(Item(title=config.get_localized_string(30118), channel="channelselector", action="getchanneltypes",
@@ -38,11 +42,16 @@ def getmainlist(view="thumb_"):
context = CONTEXT))
if addon.getSetting('enable_search_menu') == "true":
# itemlist.append(Item(title=config.get_localized_string(30103), channel="search", path='special', action="mainlist",
# thumbnail=get_thumb("search.png", view),
# category=config.get_localized_string(30119), viewmode="list",
# context = CONTEXT + [{"title": config.get_localized_string(60412), "action": "setting_channel_new", "channel": "search"},
# {"title": config.get_localized_string(70286), "action": "settings", "channel": "search"}]))
itemlist.append(Item(title=config.get_localized_string(30103), channel="search", path='special', action="mainlist",
thumbnail=get_thumb("search.png", view),
category=config.get_localized_string(30119), viewmode="list",
context = CONTEXT + [{"title": config.get_localized_string(60412), "action": "setting_channel_new", "channel": "search"},
{"title": config.get_localized_string(70286), "action": "settings", "channel": "search"}]))
{"title": config.get_localized_string(70286), "channel": "shortcuts", "action": "SettingOnPosition", "category":3}]))
if addon.getSetting('enable_onair_menu') == "true":
itemlist.append(Item(channel="filmontv", action="mainlist", title=config.get_localized_string(50001),
@@ -62,20 +71,31 @@ def getmainlist(view="thumb_"):
context = CONTEXT))
if config.get_videolibrary_support() and addon.getSetting('enable_library_menu') == "true":
# itemlist.append(Item(title=config.get_localized_string(30131), channel="videolibrary", action="mainlist",
# thumbnail=get_thumb("videolibrary.png", view),
# category=config.get_localized_string(30119), viewmode="thumbnails",
# context=CONTEXT + [{"title": config.get_localized_string(70287), "channel": "videolibrary",
# "action": "channel_config"}]))
itemlist.append(Item(title=config.get_localized_string(30131), channel="videolibrary", action="mainlist",
thumbnail=get_thumb("videolibrary.png", view),
category=config.get_localized_string(30119), viewmode="thumbnails",
context=CONTEXT + [{"title": config.get_localized_string(70287), "channel": "videolibrary",
"action": "channel_config"}]))
context=CONTEXT + [{"title": config.get_localized_string(70287), "channel": "shortcuts", "action": "SettingOnPosition", "category":2},
{"title": config.get_localized_string(60568), "channel": "videolibrary", "action": "update_videolibrary"}]))
if downloadenabled != "false":
# itemlist.append(Item(title=config.get_localized_string(30101), channel="downloads", action="mainlist",
# thumbnail=get_thumb("downloads.png", view), viewmode="list",
# context=CONTEXT + [{"title": config.get_localized_string(70288), "channel": "setting", "config": "downloads",
# "action": "channel_config"}]))
itemlist.append(Item(title=config.get_localized_string(30101), channel="downloads", action="mainlist",
thumbnail=get_thumb("downloads.png", view), viewmode="list",
context=CONTEXT + [{"title": config.get_localized_string(70288), "channel": "setting", "config": "downloads",
"action": "channel_config"}]))
context=CONTEXT + [{"title": config.get_localized_string(70288), "channel": "shortcuts", "action": "SettingOnPosition", "category":4}]))
thumb_setting = "setting_%s.png" % 0 # config.get_setting("plugin_updates_available")
itemlist.append(Item(title=config.get_localized_string(30100), channel="setting", action="mainlist",
# itemlist.append(Item(title=config.get_localized_string(30100), channel="setting", action="mainlist",
# thumbnail=get_thumb(thumb_setting, view),
# category=config.get_localized_string(30100), viewmode="list"))
itemlist.append(Item(title=config.get_localized_string(30100), channel="setting", action="settings",
thumbnail=get_thumb(thumb_setting, view),
category=config.get_localized_string(30100), viewmode="list"))
itemlist.append(Item(title=config.get_localized_string(30104) + " (v" + config.get_addon_version(with_fix=True) + ")", channel="help", action="mainlist",

View File

@@ -735,7 +735,7 @@ def check_list_links(itemlist, numero='', timeout=3):
El parámetro numero indica cuantos enlaces hay que verificar (0:5, 1:10, 2:15, 3:20)
El parámetro timeout indica un tope de espera para descargar la página
"""
numero = ((int(numero) + 1) * 5) if numero != '' else 10
numero = numero if numero > 4 else ((int(numero) + 1) * 5) if numero != '' else 5
import sys
if sys.version_info[0] >= 3:
from concurrent import futures

View File

@@ -1091,11 +1091,9 @@ def controls(itemlist, item, AutoPlay=True, CheckLinks=True, down_load=True):
if CL and not AP:
if get_setting('checklinks', item.channel):
checklinks = get_setting('checklinks', item.channel)
else:
checklinks = get_setting('checklinks')
if get_setting('checklinks_number', item.channel):
checklinks_number = get_setting('checklinks_number', item.channel)
else:
checklinks = get_setting('checklinks')
checklinks_number = get_setting('checklinks_number')
itemlist = servertools.check_list_links(itemlist, checklinks_number)

View File

@@ -47,7 +47,7 @@
"default": 2,
"enabled": true,
"visible": "eq(-1,true)",
"lvalues": [ "3", "5", "10", "15", "20" ]
"lvalues": [ "5", "10", "15", "20" ]
}
],

View File

@@ -465,37 +465,37 @@ def set_context_commands(item, parent_item):
else:
context = []
if config.get_setting("faster_item_serialization"):
# logger.info("Reducing serialization!")
itemBK = item
item = Item()
item.action = itemBK.action
item.channel = itemBK.channel
infoLabels = {}
if itemBK.infoLabels["year"]: infoLabels["year"] = itemBK.infoLabels["year"]
if itemBK.infoLabels["imdb_id"]: infoLabels["imdb_id"] = itemBK.infoLabels["imdb_id"]
if itemBK.infoLabels["tmdb_id"]: infoLabels["tmdb_id"] = itemBK.infoLabels["tmdb_id"]
if itemBK.infoLabels["tvdb_id"]: infoLabels["tvdb_id"] = itemBK.infoLabels["tvdb_id"]
if itemBK.infoLabels["noscrap_id"]: infoLabels["noscrap_id"] = itemBK.infoLabels["noscrap_id"]
if len(infoLabels) > 0: item.infoLabels = infoLabels
# if config.get_setting("faster_item_serialization"):
# # logger.info("Reducing serialization!")
# itemBK = item
# item = Item()
# item.action = itemBK.action
# item.channel = itemBK.channel
# infoLabels = {}
# if itemBK.infoLabels["year"]: infoLabels["year"] = itemBK.infoLabels["year"]
# if itemBK.infoLabels["imdb_id"]: infoLabels["imdb_id"] = itemBK.infoLabels["imdb_id"]
# if itemBK.infoLabels["tmdb_id"]: infoLabels["tmdb_id"] = itemBK.infoLabels["tmdb_id"]
# if itemBK.infoLabels["tvdb_id"]: infoLabels["tvdb_id"] = itemBK.infoLabels["tvdb_id"]
# if itemBK.infoLabels["noscrap_id"]: infoLabels["noscrap_id"] = itemBK.infoLabels["noscrap_id"]
# if len(infoLabels) > 0: item.infoLabels = infoLabels
if itemBK.thumbnail: item.thumbnail = itemBK.thumbnail
if itemBK.extra: item.extra = itemBK.extra
if itemBK.contentEpisodeNumber: item.contentEpisodeNumber = itemBK.contentEpisodeNumber
if itemBK.contentEpisodeTitle: item.contentEpisodeTitle = itemBK.contentEpisodeTitle
if itemBK.contentPlot: item.contentPlot = itemBK.contentPlot
if itemBK.contentQuality: item.contentQuality = itemBK.contentQuality
if itemBK.contentSeason: item.contentSeason = itemBK.contentSeason
if itemBK.contentSerieName: item.contentSerieName = itemBK.contentSerieName
if itemBK.contentThumbnail: item.contentThumbnail = itemBK.contentThumbnail
if itemBK.contentTitle: item.contentTitle = itemBK.contentTitle
if itemBK.contentType: item.contentType = itemBK.contentType
if itemBK.duration: item.duration = itemBK.duration
if itemBK.plot: item.plot = itemBK.plot
if itemBK.quality: item.quality = itemBK.quality
if itemBK.show: item.show = itemBK.show
if itemBK.title: item.title = itemBK.title
if itemBK.viewcontent: item.viewcontent = itemBK.viewcontent
# if itemBK.thumbnail: item.thumbnail = itemBK.thumbnail
# if itemBK.extra: item.extra = itemBK.extra
# if itemBK.contentEpisodeNumber: item.contentEpisodeNumber = itemBK.contentEpisodeNumber
# if itemBK.contentEpisodeTitle: item.contentEpisodeTitle = itemBK.contentEpisodeTitle
# if itemBK.contentPlot: item.contentPlot = itemBK.contentPlot
# if itemBK.contentQuality: item.contentQuality = itemBK.contentQuality
# if itemBK.contentSeason: item.contentSeason = itemBK.contentSeason
# if itemBK.contentSerieName: item.contentSerieName = itemBK.contentSerieName
# if itemBK.contentThumbnail: item.contentThumbnail = itemBK.contentThumbnail
# if itemBK.contentTitle: item.contentTitle = itemBK.contentTitle
# if itemBK.contentType: item.contentType = itemBK.contentType
# if itemBK.duration: item.duration = itemBK.duration
# if itemBK.plot: item.plot = itemBK.plot
# if itemBK.quality: item.quality = itemBK.quality
# if itemBK.show: item.show = itemBK.show
# if itemBK.title: item.title = itemBK.title
# if itemBK.viewcontent: item.viewcontent = itemBK.viewcontent
# itemJson = item.tojson()
# logger.info("Elemento: {0} bytes".format(len(itemJson)))

View File

@@ -106,13 +106,33 @@ msgid "NO"
msgstr ""
msgctxt "#30024"
msgid "Contextual Menu"
msgid "Select the elements you want to display on the Contextual Menu"
msgstr ""
msgctxt "#30025"
msgid "KoD Preferences"
msgstr "Preferenze KoD"
msgctxt "#30026"
msgid "Direct"
msgstr ""
msgctxt "#30027"
msgid "SetResolvedUrl"
msgstr ""
msgctxt "#30028"
msgid "Built-In"
msgstr ""
msgctxt "#30029"
msgid "Download and Play"
msgstr ""
msgctxt "#30030"
msgid "Advanced Options"
msgstr ""
msgctxt "#30043"
msgid "Force view mode:"
msgstr ""
@@ -3267,12 +3287,12 @@ msgid "Movie|Tv Shows|Anime|Children|Documentary|Horror|Castellan|Latin|Torrent"
msgstr ""
msgctxt "#70126"
msgid "Visual Options"
msgid "Customization"
msgstr ""
msgctxt "#70128"
msgid "Infoplus visual option"
msgstr ""
msgid "Infoplus Animation"
msgstr "Animazione Infoplus"
msgctxt "#70129"
msgid "Without animation"
@@ -3679,15 +3699,15 @@ msgid "File location"
msgstr ""
msgctxt "#70230"
msgid " - Add completed downloads to the video library "
msgid "Add completed downloads to the video library "
msgstr ""
msgctxt "#70231"
msgid " - Move the downloaded file to the video library"
msgid "Move the downloaded file to the video library"
msgstr ""
msgctxt "#70232"
msgid " - View files downloaded from downloads"
msgid "View files downloaded from downloads"
msgstr ""
msgctxt "#70233"
@@ -3715,7 +3735,7 @@ msgid "- Order of servers"
msgstr ""
msgctxt "#70240"
msgid " - Preferred quality"
msgid "Preferred quality"
msgstr ""
msgctxt "#70241"
@@ -3723,7 +3743,7 @@ msgid "The highest"
msgstr ""
msgctxt "#70242"
msgid " - Choose the fastest servers"
msgid "Choose the fastest servers"
msgstr ""
msgctxt "#70243"
@@ -5562,7 +5582,7 @@ msgid "Use your custom channel URLs"
msgstr ""
msgctxt "#70706"
msgid "autostart KOD at Kodi boot"
msgid "Autostart KOD at Kodi boot"
msgstr ""
msgctxt "#70707"
@@ -5598,7 +5618,7 @@ msgid "Customize Homepage"
msgstr ""
msgctxt "#70716"
msgid "Choose menus you wanna in homepage"
msgid "Select the elements you want to display on the Homepage"
msgstr ""
msgctxt "#70717"
@@ -5761,6 +5781,38 @@ msgctxt "#70757"
msgid "Compact"
msgstr ""
msgctxt "#70758"
msgid "Buffer size to download before playback"
msgstr ""
msgctxt "#70759"
msgid "Limit (in Kb's) of background download speed (DOES NOT affect RAR)"
msgstr ""
msgctxt "#70760"
msgid "Do you want the RAR and ZIP files to be decompressed for playback?"
msgstr ""
msgctxt "#70761"
msgid "Uncompressing RARs in the background?"
msgstr ""
msgctxt "#70762"
msgid "Do you want to convert Magnets to Torrents to see sizes and store them?"
msgstr ""
msgctxt "#70763"
msgid "HD 1080"
msgstr ""
msgctxt "#70764"
msgid "HD 720"
msgstr ""
msgctxt "#70765"
msgid "SD"
msgstr ""
# DNS start [ settings and declaration ]
msgctxt "#707401"
msgid "Enable DNS Check Alert"

View File

@@ -106,13 +106,33 @@ msgid "NO"
msgstr "NO"
msgctxt "#30024"
msgid "Contextual Menu"
msgstr "Menu Contestuale"
msgid "Select the elements you want to display on the Contextual Menu"
msgstr "Seleziona gli elementi che vuoi visualizzare nel Menu Contestuale"
msgctxt "#30025"
msgid "KoD Preferences"
msgstr "Preferenze KoD"
msgctxt "#30026"
msgid "Direct"
msgstr "Direct"
msgctxt "#30027"
msgid "SetResolvedUrl"
msgstr "SetResolvedUrl"
msgctxt "#30028"
msgid "Built-In"
msgstr "Built-In"
msgctxt "#30029"
msgid "Download and Play"
msgstr "Download and Play"
msgctxt "#30030"
msgid "Advanced Options"
msgstr "Opzioni Avanzate"
msgctxt "#30043"
msgid "Force view mode:"
msgstr "Forza modalità di visualizzazione:"
@@ -3266,12 +3286,12 @@ msgid "Movie|Tv Shows|Anime|Children|Documentary|Horror|Castellan|Latin|Torrent"
msgstr "Fim|Serie TV|Anime|Bambini|Documentari|Horror|Castigliano|Latino|Torrent"
msgctxt "#70126"
msgid "Visual Options"
msgstr "Opzioni Vista"
msgid "Customization"
msgstr "Personalizzazione"
msgctxt "#70128"
msgid "Infoplus visual option"
msgstr "Opzioni Vista Infoplus"
msgid "Infoplus Animation"
msgstr "Animazione Infoplus"
msgctxt "#70129"
msgid "Without animation"
@@ -3678,16 +3698,16 @@ msgid "File location"
msgstr "Posizione dei files"
msgctxt "#70230"
msgid " - Add completed downloads to the video library "
msgstr " - Aggiungi download completi alla videoteca"
msgid "Add completed downloads to the video library "
msgstr "Aggiungi download completi alla videoteca"
msgctxt "#70231"
msgid " - Move the downloaded file to the video library"
msgstr " - Sposta i files scaricati nella videoteca"
msgid "Move the downloaded file to the video library"
msgstr "Sposta i files scaricati nella videoteca"
msgctxt "#70232"
msgid " - View files downloaded from downloads"
msgstr " - Visualizzare i files scaricati da Downloads"
msgid "View files downloaded from downloads"
msgstr "Visualizzare i files scaricati da Downloads"
msgctxt "#70233"
msgid " - Size per block"
@@ -3714,16 +3734,16 @@ msgid "- Order of servers"
msgstr " - Ordine dei servers"
msgctxt "#70240"
msgid " - Preferred quality"
msgstr " - Qualità preferita"
msgid "Preferred quality"
msgstr "Qualità preferita"
msgctxt "#70241"
msgid "The highest"
msgstr "La più alta"
msgctxt "#70242"
msgid " - Choose the fastest servers"
msgstr " - Scegli i servers più veloci"
msgid "Choose the fastest servers"
msgstr "Scegli i servers più veloci"
msgctxt "#70243"
msgid "Download"
@@ -5562,8 +5582,8 @@ msgid "Use your custom channel URLs"
msgstr "Utilizza URL personalizzati per i canali"
msgctxt "#70706"
msgid "autostart KOD at Kodi boot"
msgstr "avvio automatico di KOD al boot di Kodi"
msgid "Autostart KOD at Kodi boot"
msgstr "Avvio automatico di KOD al boot di Kodi"
msgctxt "#70707"
msgid "Enable"
@@ -5598,8 +5618,8 @@ msgid "Customize Homepage"
msgstr "Personalizza Homepage"
msgctxt "#70716"
msgid "Choose menus you wanna in homepage"
msgstr "Seleziona gli elementi che vuoi visualizzare nella homepage"
msgid "Select the elements you want to display on the Homepage"
msgstr "Seleziona gli elementi che vuoi visualizzare nella Homepage"
msgctxt "#70717"
msgid "Are all the special episodes present?"
@@ -5765,6 +5785,38 @@ msgctxt "#70757"
msgid "Compact"
msgstr "Compatta"
msgctxt "#70758"
msgid "Buffer size to download before playback"
msgstr "Dimensione del buffer da scaricare prima della riproduzione"
msgctxt "#70759"
msgid "Limit (in Kb's) of background download speed (DOES NOT affect RAR)"
msgstr "Limite (in Kb) della velocità di download in background (NON influisce su RAR)"
msgctxt "#70760"
msgid "Do you want the RAR and ZIP files to be decompressed for playback?"
msgstr "Vuoi che i file RAR e ZIP vengano decompressi per la riproduzione?"
msgctxt "#70761"
msgid "Uncompressing RARs in the background?"
msgstr "Decomprimere i RAR in secondo piano?"
msgctxt "#70762"
msgid "Do you want to convert Magnets to Torrents to see sizes and store them?"
msgstr "Vuoi convertire i Magnets to Torrents per vedere le dimensioni e memorizzarle?"
msgctxt "#70763"
msgid "HD 1080"
msgstr "HD 1080"
msgctxt "#70764"
msgid "HD 720"
msgstr "HD 720"
msgctxt "#70765"
msgid "SD"
msgstr "SD"
# DNS start [ settings and declaration ]
msgctxt "#707401"
msgid "Enable DNS Check Alert"

View File

@@ -2,29 +2,96 @@
<settings>
<!-- General -->
<category label="70168">
<setting id="thumbnail_type" type="enum" lvalues="30011|30012|30200" label="30010" default="2"/>
<setting id="channel_language" type="labelenum" values="auto|all|ita" label="30019" default="all"/>
<setting id="trakt_sync" type="bool" label="70109" default="false"/>
<setting id="autostart" type="action" label="70706" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAiYXV0b3N0YXJ0IiwNCiAgICAiY2hhbm5lbCI6ICJzZXR0aW5nIg0KfQ==)"/>
<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 id="faster_item_serialization" type="bool" label="30300" default="false"/>
<!-- <setting id="faster_item_serialization" type="bool" label="30300" default="false"/> -->
<setting type="sep"/>
<setting id="trakt_sync" type="bool" label="70109" default="false"/>
<setting id="resolver_dns" type="bool" label="707408" default="true" enable="true" visible="true"/>
<setting id="debug" type="bool" label="30003" default="false"/>
<setting label="70169" type="lsep"/>
<setting id="resolve_priority" type="enum" label="70110" lvalues="70164|70165|70166" default="0"/>
<setting id="resolve_stop" type="bool" label="70111" default="true"/>
<setting id="hidepremium" type="bool" label="70112" default="false"/>
<setting type="sep"/>
<setting label="60305" type="lsep"/>
<setting id="adult_aux_intro_password" type="text" label="70113" option="hidden" default=""/>
<setting id="adult_mode" type="enum" lvalues="60602|60616|70114" label="30002" enable="!eq(-1,)" default="0"/>
<setting id="adult_request_password" type="bool" label="70115" enable="!eq(-1,0)+!eq(-2,)" default="true"/>
<setting id="adult_aux_new_password1" type="text" label="70116" option="hidden" enable="!eq(-3,)" default=""/>
<setting id="adult_aux_new_password2" type="text" label="70117" option="hidden" enable="!eq(-1,)" default=""/>
</category>
<!-- Playback -->
<category label="70753">
<setting id="player_mode" type="select" lvalues="30026|30027|30028|30029" label="30044" default="1"/>
<setting id="default_action" type="select" lvalues="30006|30007|30008" label="30005" default="0"/>
<setting id="autoplay" type="bool" label="70562" default="false" visible="true"/>
<setting id="hide_servers" type="bool" label="70747" default="false" visible="eq(-1,true)"/>
<setting id="checklinks" type="bool" label="30020" default="false"/>
<setting id="checklinks_number" type="slider" option="int" range="5,5,20" label="30021" default="5" visible="eq(-1,true)"/>
</category>
<!-- Videolibrary -->
<category label="30131">
<setting label="30501" type="lsep"/>
<setting id="videolibrarypath" type="folder" label="30067" default="special://profile/addon_data/plugin.video.kod/videolibrary"/>
<setting id="folder_tvshows" type="text" label="70118" default="SERIES" subsetting="true"/>
<setting id="folder_movies" type="text" label="70119" default="CINE" subsetting="true"/>
<setting label="59997" type="lsep"/>
<setting id="videolibrary_kodi_flag" type="number" label="" default="0" visible="false"/>
<setting id="videolibrary_kodi_force" type="bool" label="" default="false" visible="false"/>
<setting id="videolibrary_kodi" type="bool" label="70120" enable="lt(-1,2)+eq(0,false)" default="false"/>
<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 label="30030" type="lsep"/>
<setting id="vidolibrary_preferences" type="action" label="60542" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAiY2hhbm5lbF9jb25maWciLA0KICAgICJjaGFubmVsIjogInZpZGVvbGlicmFyeSINCn0==)"/>
<setting id="vidolibrary_overwrite" type="action" label="60567" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAib3ZlcndyaXRlX3Rvb2xzIiwNCiAgICAiY2hhbm5lbCI6ICJzZXR0aW5nIg0KfQ==)"/>
<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"/>
<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="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 -->
<category label="70715">
<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"/>
@@ -33,102 +100,72 @@
<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="70121" 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)"/>
<setting id="news_start" type="bool" label="70123" default="false" visible="eq(-2,True)" enable="eq(-1,False)+eq(-2,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)+(-2,false)"/>
<!-- <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>
<!-- Playback -->
<category label="70753">
<setting id="player_mode" type="enum" values="Direct|SetResolvedUrl|Built-In|Download and Play" label="30044" default="1"/>
<setting id="default_action" type="enum" lvalues="30006|30007|30008" label="30005" default="0"/>
<setting id="autoplay" type="bool" label="70562" default="false" visible="true"/>
<setting id="hide_servers" type="bool" label="70747" default="false" visible="eq(-1,true)"/>
<setting id="checklinks" type="bool" label="30020" default="false"/>
<setting id="checklinks_number" type="enum" values="5|10|15|20" label="30021" default="0" visible="eq(-1,true)"/>
<category label="30118" >
<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==)"/>
</category>
<!-- Videolibrary -->
<category label="30131">
<!-- <setting id="downloadpath" type="folder" label="30017" default=""/>
<setting id="downloadlistpath" type="folder" label="30018" default=""/> -->
<setting label="30501" type="lsep"/>
<setting id="videolibrarypath" type="folder" label="30067" default="special://profile/addon_data/plugin.video.kod/videolibrary"/>
<setting id="folder_tvshows" type="text" label="70118" default="SERIES"/>
<setting id="folder_movies" type="text" label="70119" default="CINE"/>
<setting label="59997" type="lsep"/>
<setting id="videolibrary_kodi_flag" type="number" label="" default="0" visible="false"/>
<setting id="videolibrary_kodi_force" type="bool" label="" default="false" visible="false"/>
<setting id="videolibrary_kodi" type="bool" label="70120" enable="lt(-1,2)+eq(0,false)" default="false"/>
<setting id="videolibrary_max_quality" type="bool" label="70729" default="false" visible="true"/>
<setting id="next_ep" type="enum" 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)"/>
<!-- <setting id="next_ep_type" type="bool" label="70754" default="false" visible="eq(-1,2)"/> -->
<setting id="next_ep_seconds" type="enum" values="20|30|40|50|60|70|80|90|100|110|120" label="70749" default="2" visible="!eq(-2,0)"/>
</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"/>
<setting id="downloadlistpath" type="folder" label="30018" visible="eq(-2,true)" default="special://profile/addon_data/plugin.video.kod/downloads/list"/>
</category>
<!-- Visual -->
<category label="70126">
<setting id="icon_set" type="labelenum" 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="infoplus_set" type="labelenum" label="70128" lvalues="70129|70130" default="70129"/>
<setting id="video_thumbnail_type" type="enum" label="70131" lvalues="70132|70133" 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"/>
<!-- Servers -->
<category label="70145" >
<setting id="resolve_priority" type="select" label="70110" lvalues="70164|70165|70166" default="0"/>
<setting id="resolve_stop" type="bool" label="70111" default="true"/>
<setting id="hidepremium" type="bool" label="70112" default="false"/>
<setting label="70578" type="lsep"/>
<setting id="httptools_timeout" type="slider" option="int" range="0,5,120" label="70580" default="15"/>
<setting label="60538" type="lsep"/>
<setting id="servers_favorites" type="action" label="60551" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAic2VydmVyc19mYXZvcml0ZXMiLA0KICAgICJjaGFubmVsIjogInNldHRpbmciDQp9==)"/>
<setting id="servers_blacklist" type="action" label="60550" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAic2VydmVyc19ibGFja2xpc3QiLA0KICAgICJjaGFubmVsIjogInNldHRpbmciDQp9==)"/>
<setting id="servers_config" type="action" label="60538" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAic2VydmVyc19tZW51IiwNCiAgICAiY2hhbm5lbCI6ICJzaG9ydGN1dHMiDQp9==)"/>
<setting id="debriders_config" type="action" label="60552" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiAic2VydmVyc19tZW51IiwNCiAgICAiY2hhbm5lbCI6ICJzaG9ydGN1dHMiLA0KCSJ0eXBlIjogImRlYnJpZGVycyINCn0==)"/>
<setting id="torrent_config" type="action" label="70253" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJzZXR0aW5nX3RvcnJlbnQiLA0KICAgICJjaGFubmVsIjoic2V0dGluZyINCn0=)"/>
</category>
<!-- Other -->
<category label="70149">
<setting label="70150" type="lsep"/>
<setting id="infoplus" type="bool" label="70151" default="true"/>
<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==)"/>
<setting type="sep"/>
<setting label="70154" type="lsep"/>
<setting id="tmdb_active" default="true" visible="false"/>
<setting id="tmdb_threads" type="labelenum" values="5|10|15|20|25|30" label="70155" default="20"/>
<setting id="tmdb_threads" type="slider" option="int" range="5,5,30" label="70155" default="20"/>
<setting id="tmdb_plus_info" type="bool" label="70156" default="false"/>
<setting id="tmdb_cache" type="bool" label="70157" default="true"/>
<setting id="tmdb_cache_expire" type="enum" lvalues="70158|70159|70160|70161|70170" label="70162" enable="eq(-1,true)" default="4"/>
<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 type="sep"/>
<setting label="70578" type="lsep"/>
<setting id="httptools_timeout" type="labelenum" values="0|5|10|15|20|25|30" label="70580" default="15"/>
<setting type="sep"/>
<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="labelenum" values="1|2|4|8|24" label="707416" default="1"/>
<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>
<!-- Custom Start -->
<category label="70121">
<setting id="start_page" type="bool" label="70121" default="false"/>
<setting id="custom_start" type="bool" label="70122" default="false"
visible="eq(-1,True)"/>
<setting id="news_start" type="bool" label="70123" default="false" visible="eq(-2,True)"
enable="eq(-1,False)+eq(-2,True"/>
<setting id="category" type="labelenum" 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)"/>
<!-- Adult -->
<category label="60305">
<setting id="adult_aux_intro_password" type="text" label="70113" option="hidden" default=""/>
<setting id="adult_mode" type="select" lvalues="60602|60616|70114" label="30002" enable="!eq(-1,)" default="0"/>
<setting id="adult_request_password" type="bool" label="70115" enable="!eq(-1,0)+!eq(-2,)" default="true"/>
<setting id="adult_aux_new_password1" type="text" label="70116" option="hidden" enable="!eq(-3,)" default=""/>
<setting id="adult_aux_new_password2" type="text" label="70117" option="hidden" enable="!eq(-1,)" default=""/>
</category>
</settings>

View File

@@ -10,8 +10,8 @@
]
},
"free": true,
"id": "animeworld",
"name": "animeworld",
"id": "animeworld_server",
"name": "Animeworld",
"settings": [
{
"default": false,

View File

@@ -8,36 +8,6 @@
"movie"
],
"settings": [
{
"type": "label",
"label": "@70229",
"enabled": true,
"visible": true
},
{
"id": "library_add",
"type": "bool",
"label": "@70230",
"default": false,
"enabled": true,
"visible": true
},
{
"id": "library_move",
"type": "bool",
"label": "@70231",
"default": false,
"enabled": "eq(-1,true)",
"visible": true
},
{
"id": "browser",
"type": "bool",
"label": "@70232",
"default": true,
"enabled": true,
"visible": true
},
{
"type": "label",
"label": "@70243",
@@ -122,28 +92,6 @@
"enabled": true,
"visible": true
},
{
"id": "quality",
"type": "list",
"label": "@70240",
"lvalues": [
"@70241",
"HD 1080",
"HD 720",
"SD"
],
"default": 0,
"enabled": true,
"visible": true
},
{
"id": "server_speed",
"type": "bool",
"label": "@70242",
"default": true,
"enabled": true,
"visible": true
},
{
"id": "server_reorder",
"type": "list",
@@ -161,10 +109,10 @@
"type": "list",
"label": "@70246",
"lvalues": [
"Ita, Sub, Eng, Vos, Vosi",
"Eng, Ita, Sub, Vos, Vosi",
"Sub, Ita, Eng, Vos, Vosi",
"Eng, Sub, Ita, Vos, Vosi"
"Ita, Sub, Eng",
"Eng, Ita, Sub",
"Sub, Ita, Eng",
"Eng, Sub, Ita"
],
"default": 0,
"enabled": "eq(-1,'@70245')",

View File

@@ -112,7 +112,7 @@ def mainlist(item):
contentType=item.contentType, contentChannel=item.contentChannel,
contentSerieName=item.contentSerieName))
if not item.contentType == "tvshow" and config.get_setting("browser", "downloads") == True:
if not item.contentType == "tvshow" and config.get_setting("browser") == True:
itemlist.insert(0, Item(channel=item.channel, action="browser", title=support.typo(config.get_localized_string(70222),'bold'),url=DOWNLOAD_PATH))
if not item.contentType == "tvshow":
@@ -285,7 +285,7 @@ def move_to_libray(item):
library_path = filetools.join(move_path, *filetools.split(item.downloadFilename))
final_path = download_path
if config.get_setting("library_add", "downloads") == True and config.get_setting("library_move", "downloads") == True:
if config.get_setting("library_add") == True and config.get_setting("library_move") == True:
if not filetools.isdir(filetools.dirname(library_path)):
filetools.mkdir(filetools.dirname(library_path))
@@ -322,7 +322,7 @@ def move_to_libray(item):
xbmc.sleep(500)
xbmc_videolibrary.clean()
if config.get_setting("library_add", "downloads") == True and config.get_setting("library_move", "downloads") == False:
if config.get_setting("library_add") == True and config.get_setting("library_move") == False:
if filetools.isfile(final_path):
if item.contentType == "movie" and item.infoLabels["tmdb_id"]:
library_item = Item(title=config.get_localized_string(70228) % item.downloadFilename, channel="downloads",
@@ -471,7 +471,7 @@ def sort_method(item):
"VOSI": ["VOSI"]}
order_list_calidad = ["BLURAY", "FULLHD", "HD", "480P", "360P", "240P"]
order_list_calidad = quality_orders[int(config.get_setting("quality", "downloads"))]
order_list_calidad = quality_orders[int(config.get_setting("quality"))]
match_list_calidad = {"BLURAY": ["BR", "BLURAY", '4K'],
"FULLHD": ["FULLHD", "FULL HD", "1080", "HD1080", "HD 1080", "1080p"],
"HD": ["HD", "HD REAL", "HD 720", "720", "HDTV", "720p"],
@@ -482,7 +482,7 @@ def sort_method(item):
value = (get_match_list(item.title, match_list_idimas, order_list_idiomas, ignorecase=True, only_ascii=True).index, \
get_match_list(item.title, match_list_calidad, order_list_calidad, ignorecase=True, only_ascii=True).index)
if config.get_setting("server_speed", "downloads"):
if config.get_setting("server_speed"):
value += tuple([get_server_position(item.server)])
return value
@@ -723,8 +723,8 @@ def start_download(item):
def get_episodes(item):
logger.info("contentAction: %s | contentChannel: %s | contentType: %s" % (
item.contentAction, item.contentChannel, item.contentType))
logger.info("contentAction: %s | contentChannel: %s | contentType: %s" % (item.contentAction, item.contentChannel, item.contentType))
if 'dlseason' in item:
season = True
season_number = item.dlseason
@@ -782,13 +782,13 @@ def get_episodes(item):
episode.contentTitle = re.sub("\[[^\]]+\]|\([^\)]+\)|\d*x\d*\s*-", "", episode.title).strip()
episode.downloadFilename = filetools.validate_path(filetools.join(item.downloadFilename, "%dx%0.2d - %s" % (episode.contentSeason, episode.contentEpisodeNumber, episode.contentTitle.strip())))
itemlist.append(episode)
if season:
if scrapertools.find_single_match(episode.title, r'(\d+)x') == season_number:
itemlist.append(episode)
else:
itemlist.append(episode)
# Cualquier otro resultado no nos vale, lo ignoramos
else:
logger.info("Omitiendo item no válido: %s" % episode.tostring())

View File

@@ -82,7 +82,7 @@ def mainlist(item):
return itemlist
def server_config(item):
return platformtools.show_channel_settings(channelpath=filetools.join(config.get_runtime_path(), "specials", item.config))
return platformtools.show_channel_settings(channelpath=filetools.join(config.get_runtime_path(), "server", item.config))
def now_on_misc_film(item):
logger.info("filmontv tvoggi")

View File

@@ -56,6 +56,8 @@ if xinfoplus_set == config.get_localized_string(70129):
set_animation = False
if xinfoplus_set == config.get_localized_string(70130):
set_animation = True
else:
set_animation = xinfoplus_set
def start(item, recomendaciones=[], from_window=False):
if from_window:

View File

@@ -591,8 +591,8 @@ def menu_opciones(item):
# itemlist.append(Item(channel=item.channel, action="setting_channel", extra="latino", title=config.get_localized_string(70213),
# thumbnail=get_thumb("channels_documentary.png"), folder=False))
itemlist.append(Item(channel=item.channel, action="setting_channel", extra="Torrent", title=config.get_localized_string(70214),
thumbnail=get_thumb("channels_documentary.png"), folder=False))
# itemlist.append(Item(channel=item.channel, action="setting_channel", extra="torrent", title=config.get_localized_string(70214),
# thumbnail=get_thumb("channels_documentary.png"), folder=False))
itemlist.append(Item(channel=item.channel, action="setting_channel", extra="documentales",
title=config.get_localized_string(60530),

View File

@@ -57,7 +57,9 @@ def next_ep(item):
time_over = False
time_limit = time() + 30
time_steps = [20,30,40,50,60,70,80,90,100,110,120]
TimeFromEnd = time_steps[config.get_setting('next_ep_seconds')]
time_setting = config.get_setting('next_ep_seconds')
TimeFromEnd = time_setting if time_setting > 10 else time_steps[time_setting]
# wait until the video plays
while not platformtools.is_playing() and time() < time_limit:

View File

@@ -47,7 +47,7 @@ def mainlist(item):
Item(channel=item.channel, title=typo(config.get_localized_string(59994), 'color kod bold'), action='opciones', thumbnail=get_thumb('setting_0.png')),
Item(channel=item.channel, title=typo(config.get_localized_string(30100), 'color kod bold'), action='settings', thumbnail=get_thumb('setting_0.png'))]
Item(channel='shortcuts', title=typo(config.get_localized_string(30100), 'color kod bold'), action='SettingOnPosition', category=3, thumbnail=get_thumb('setting_0.png'))]
itemlist = set_context(itemlist)
@@ -114,7 +114,8 @@ def new_search(item):
logger.info()
itemlist = []
if channeltools.get_channel_setting('last_search', 'search'):
if config.get_setting('last_search'):
# if channeltools.get_channel_setting('last_search', 'search'):
last_search = channeltools.get_channel_setting('Last_searched', 'search', '')
else:
last_search = ''
@@ -253,7 +254,7 @@ def channel_search(item):
if it in valid:
continue
if mode == 'all' or (it.contentType and mode == it.contentType):
if config.get_setting('result_mode', 'search') != 0:
if config.get_setting('result_mode') != 0:
if config.get_localized_string(30992) not in it.title:
it.title += typo(ch_name,'_ [] color kod bold')
results.append(it)
@@ -267,7 +268,7 @@ def channel_search(item):
if not grouped:
continue
# to_temp[key] = grouped
if config.get_setting('result_mode', 'search') == 0:
if config.get_setting('result_mode') == 0:
if not config.get_setting('unify'):
title = typo(ch_name,'bold') + typo(str(len(grouped)), '_ [] color kod bold')
else:
@@ -371,9 +372,8 @@ def settings(item):
return platformtools.show_channel_settings(caption=config.get_localized_string(59993))
def set_workers():
list_mode=[None,1,2,4,6,8,16,24,32,64]
index = config.get_setting('thread_number', 'search')
return list_mode[index]
workers = config.get_setting('thread_number') if config.get_setting('thread_number') > 0 else None
return workers
def setting_channel_new(item):
import xbmcgui
@@ -723,7 +723,7 @@ def get_from_temp(item):
def save_search(text):
if text:
saved_searches_limit = int((10, 20, 30, 40)[int(config.get_setting("saved_searches_limit", "search"))])
saved_searches_limit = config.get_setting("saved_searches_limit")
current_saved_searches_list = config.get_setting("saved_searches_list", "search")
if current_saved_searches_list is None:

View File

@@ -155,7 +155,7 @@ def setting_torrent(item):
{
"id": "mct_buffer",
"type": "text",
"label": "MCT - Tamaño del Buffer a descargar antes de la reproducción",
"label": "MCT - " + config.get_localized_string(70758),
"default": BUFFER,
"enabled": True,
"visible": "eq(-1,%s)" % torrent_options[2]
@@ -163,7 +163,7 @@ def setting_torrent(item):
{
"id": "mct_download_path",
"type": "text",
"label": "MCT - Ruta de la carpeta de descarga",
"label": "MCT - " + config.get_localized_string(30017),
"default": DOWNLOAD_PATH,
"enabled": True,
"visible": "eq(-2,%s)" % torrent_options[2]
@@ -171,7 +171,7 @@ def setting_torrent(item):
{
"id": "bt_buffer",
"type": "text",
"label": "BT - Tamaño del Buffer a descargar antes de la reproducción",
"label": "BT - " + config.get_localized_string(70758),
"default": BUFFER_BT,
"enabled": True,
"visible": "eq(-3,%s)" % torrent_options[1]
@@ -179,7 +179,7 @@ def setting_torrent(item):
{
"id": "bt_download_path",
"type": "text",
"label": "BT - Ruta de la carpeta de descarga",
"label": "BT - " + config.get_localized_string(30017),
"default": DOWNLOAD_PATH_BT,
"enabled": True,
"visible": "eq(-4,%s)" % torrent_options[1]
@@ -187,7 +187,7 @@ def setting_torrent(item):
{
"id": "mct_download_limit",
"type": "text",
"label": "Límite (en Kb's) de la velocidad de descarga en segundo plano (NO afecta a RAR)",
"label": config.get_localized_string(70759),
"default": DOWNLOAD_LIMIT,
"enabled": True,
"visible": "eq(-5,%s) | eq(-5,%s)" % (torrent_options[1], torrent_options[2])
@@ -195,7 +195,7 @@ def setting_torrent(item):
{
"id": "mct_rar_unpack",
"type": "bool",
"label": "¿Quiere que se descompriman los archivos RAR y ZIP para su reproducción?",
"label": config.get_localized_string(70760),
"default": RAR,
"enabled": True,
"visible": True
@@ -203,7 +203,7 @@ def setting_torrent(item):
{
"id": "mct_background_download",
"type": "bool",
"label": "¿Se procesa la descompresión de RARs en segundo plano?",
"label": config.get_localized_string(70761),
"default": BACKGROUND,
"enabled": True,
"visible": True
@@ -211,7 +211,7 @@ def setting_torrent(item):
{
"id": "magnet2torrent",
"type": "bool",
"label": "¿Quiere convertir los Magnets a Torrents para ver tamaños y almacenarlos?",
"label": config.get_localized_string(70762),
"default": MAGNET2TORRENT,
"enabled": True,
"visible": True

View File

@@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-
from platformcode import logger
def context():
from platformcode import config
context = []
@@ -21,3 +23,124 @@ def shortcut_menu(item):
def settings_menu(item):
from platformcode import config
config.open_settings()
def servers_menu(item):
# from core.support import dbg; dbg()
from core import servertools
from core.item import Item
from platformcode import config, platformtools
from specials import setting
names = []
ids = []
if item.type == 'debriders':
action = 'server_debrid_config'
server_list = list(servertools.get_debriders_list().keys())
for server in server_list:
server_parameters = servertools.get_server_parameters(server)
if server_parameters['has_settings']:
names.append(server_parameters['name'])
ids.append(server)
select = platformtools.dialog_select(config.get_localized_string(60552), names)
ID = ids[select]
it = Item(channel = 'settings',
action = action,
config = ID)
return setting.server_debrid_config(it)
else:
action = 'server_config'
server_list = list(servertools.get_servers_list().keys())
for server in sorted(server_list):
server_parameters = servertools.get_server_parameters(server)
if server_parameters["has_settings"] and [x for x in server_parameters["settings"] if x["id"] not in ["black_list", "white_list"]]:
names.append(server_parameters['name'])
ids.append(server)
select = platformtools.dialog_select(config.get_localized_string(60538), names)
ID = ids[select]
it = Item(channel = 'settings',
action = action,
config = ID)
return setting.server_config(it)
def channels_menu(item):
import channelselector
from core import channeltools
from core.item import Item
from platformcode import config, platformtools
from specials import setting
names = []
ids = []
channel_list = channelselector.filterchannels("all")
for channel in channel_list:
if not channel.channel:
continue
channel_parameters = channeltools.get_channel_parameters(channel.channel)
if channel_parameters["has_settings"]:
names.append(channel.title)
ids.append(channel.channel)
select = platformtools.dialog_select(config.get_localized_string(60537), names)
ID = ids[select]
it = Item(channel='settings',
action="channel_config",
config=ID)
return setting.channel_config(it)
def check_channels(item):
from specials import setting
from platformcode import config, platformtools
# from core.support import dbg; dbg()
item.channel = 'setting'
item.extra = 'lib_check_datajson'
itemlist = setting.conf_tools(item)
text = ''
for item in itemlist:
text += item.title + '\n'
platformtools.dialog_textviewer(config.get_localized_string(60537), text)
def SettingOnPosition(item):
# addonId is the Addon ID
# item.category is the Category (Tab) offset (0=first, 1=second, 2...etc)
# item.setting is the Setting (Control) offse (0=first, 1=second, 2...etc)
# This will open settings dialog focusing on fourth setting (control) inside the third category (tab)
import xbmc
xbmc.executebuiltin('Addon.OpenSettings(plugin.video.kod)')
category = item.category if item.category else 0
setting = item.setting if item.setting else 0
logger.info('SETTING= ' + str(setting))
xbmc.executebuiltin('SetFocus(%i)' % (category - 100))
xbmc.executebuiltin('SetFocus(%i)' % (setting - 80))
def select(item):
from platformcode import config, platformtools
# item.id = setting ID
# item.type = labels or values
# item.values = values separeted by |
# item.label = string or string id
label = config.get_localized_string(int(item.label)) if item.label.isdigit() else item.label
values = []
if item.type == 'labels':
for val in item.values.split('|'):
values.append(config.get_localized_string(int(val)))
else:
values = item.values.split('|')
select = platformtools.dialog_select(label, values)
config.set_setting(item.id, values[select])