Merge remote-tracking branch 'origin/master'

This commit is contained in:
marco
2020-04-07 23:48:24 +02:00
9 changed files with 108 additions and 149 deletions
+45 -39
View File
@@ -1,13 +1,10 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# ------------------------------------------------------------ # ------------------------------------------------------------
# Canale per AnimeSaturn # Canale per AnimeSaturn
# Thanks to 4l3x87
# ---------------------------------------------------------- # ----------------------------------------------------------
from core import support from core import support
# __channel__ = "animesaturn"
# host = support.config.get_setting("channel_host", __channel__)
host = support.config.get_channel_url() host = support.config.get_channel_url()
headers={'X-Requested-With': 'XMLHttpRequest'} headers={'X-Requested-With': 'XMLHttpRequest'}
@@ -31,11 +28,8 @@ def search(item, texto):
search = texto search = texto
item.contentType = 'tvshow' item.contentType = 'tvshow'
anime = True anime = True
patron = r'href="(?P<url>[^"]+)"[^>]+>[^>]+>(?P<title>[^<|(]+)(?:(?P<lang>\(([^\)]+)\)))?<|\)' patron = r'<a href="(?P<url>[^"]+)"[^>]+> <span>(?P<title>[^<\(]+)(?:\s*\((?P<year>\d+)\))?(?:\s*\((?P<lang>[A-Za-z-]+)\))?'
action = 'check' action = 'check'
def itemHook(item):
item.url = item.url.replace('www.','')
return item
return locals() return locals()
@@ -59,37 +53,52 @@ def newest(categoria):
@support.scrape @support.scrape
def menu(item): def menu(item):
patronMenu = r'u>(?P<title>[^<]+)<u>(?P<url>.*?)</div> </div>' patronMenu = r'<div class="col-md-13 bg-dark-as-box-shadow p-2 text-white text-center">(?P<title>[^"<]+)<(?P<url>.*?)(?:"lista-top"|"clearfix")'
action = 'peliculas' action = 'peliculas'
def itemHook(item): item.args = 'top'
item.url = item.url.replace('www.','')
return item
return locals() return locals()
@support.scrape @support.scrape
def peliculas(item): def peliculas(item):
anime = True anime = True
deflang= 'Sub-ITA' deflang= 'Sub-ITA'
if item.args == 'updated': action = 'check'
post = "page=" + str(item.page if item.page else 1) if item.page > 1 else None
page= support.match(item, patron=r'data-page="(\d+)" title="Next">', post=post, headers=headers).match page = None
patron = r'<img alt="[^"]+" src="(?P<thumb>[^"]+)" [^>]+></div></a>\s*<a href="(?P<url>[^"]+)"><div class="testo">(?P<title>[^\(<]+)(?:(?P<lang>\(([^\)]+)\)))?</div></a>\s*<a href="[^"]+"><div class="testo2">[^\d]+(?P<episode>\d+)</div></a>' post = "page=" + str(item.page if item.page else 1) if item.page > 1 else None
if page: nextpage = page
item.contentType='episode' if item.args == 'top':
action = 'findvideos' data=item.url
elif item.args == 'top': patron = r'light">(?P<title2>[^<]+)</div>\s(?P<title>[^<]+)[^>]+>[^>]+>\s<a href="(?P<url>[^"]+)">(?:<a[^>]+>|\s*)<img alt="[^"]+" src="(?P<thumb>[^"]+)"'
data = item.url
patron = r'<a href="(?P<url>[^"]+)">[^>]+>(?P<title>[^<\(]+)(?:\((?P<year>[0-9]+)\))?(?:\((?P<lang>[A-Za-z]+)\))?</div></a><div class="numero">(?P<title2>[^<]+)</div>.*?src="(?P<thumb>[^"]+)"'
action = 'check'
else: else:
pagination = '' data = support.match(item, post=post, headers=headers).data
if item.args == 'incorso': patron = r'"slider_title"\s*href="(?P<url>[^"]+)"><img src="(?P<thumb>[^"]+)"[^>]+>(?P<title>[^\(<]+)(?:\((?P<year>\d+)\))?</a>' if item.args == 'updated':
else: patron = r'href="(?P<url>[^"]+)"[^>]+>[^>]+>(?P<title>.+?)(?:\((?P<lang>ITA)\))?(?:(?P<year>\((\d+)\)))?</span>' page= support.match(data, patron=r'data-page="(\d+)" title="Next">').match
action = 'check' patron = r'<a href="(?P<url>[^"]+)" title="(?P<title>[^"(]+)(?:\s*\((?P<year>\d+)\))?(?:\s*\((?P<lang>[A-Za-z-]+)\))?"><img src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s\s*(?P<type>[^\s]+)\s*(?P<episode>\d+)'
def itemHook(item): typeContentDict = {'Movie':'movie', 'Episodio':'episode'} #item.contentType='episode'
item.url = item.url.replace('www.','') action = 'findvideos'
return item def itemlistHook(itemlist):
if page:
itemlist.append(
support.Item(channel=item.channel,
action = item.action,
contentType=item.contentType,
title=support.typo(support.config.get_localized_string(30992), 'color kod bold'),
url=item.url,
page= page,
args=item.args,
thumbnail=support.thumb()))
return itemlist
else:
pagination = ''
if item.args == 'incorso':
patron = r'<a href="(?P<url>[^"]+)"[^>]+>(?P<title>[^<(]+)(?:\s*\((?P<year>\d+)\))?(?:\s*\((?P<lang>[A-za-z-]+)\))?</a>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*<img width="[^"]+" height="[^"]+" src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<plot>[^<]+)<'
else:
patron = r'href="(?P<url>[^"]+)"[^>]+>[^>]+>(?P<title>.+?)(?:\((?P<lang>ITA)\))?(?:(?P<year>\((\d+)\)))?</span>'
return locals() return locals()
@@ -110,21 +119,18 @@ def check(item):
@support.scrape @support.scrape
def episodios(item): def episodios(item):
if item.contentType != 'movie': anime = True if item.contentType != 'movie': anime = True
patron = r'<strong" style="[^"]+">(?P<title>[^<]+)</b></strong></td>\s*<td style="[^"]+"><a href="(?P<url>[^"]+)"' patron = r'<a href="(?P<url>[^"]+)"[^>]+>\s*(?P<title>[^<]+)</a>'
def itemHook(item):
item.url = item.url.replace('www.','')
return item
return locals() return locals()
def findvideos(item): def findvideos(item):
support.log() support.log()
itemlist = [] itemlist = []
# support.dbg() url = support.match(item, patron=r'<a href="([^"]+)">[^>]+>[^>]+>G', headers=headers, debug=False).match
urls = support.match(item, patron=r'<a href="([^"]+)"><div class="downloadestreaming">', headers=headers, debug=False).matches support.log(url)
if urls: if url:
links = support.match(urls[0].replace('www.',''), patron=r'(?:<source type="[^"]+"\s*src=|file:\s*)"([^"]+)"', headers=headers, debug=False) links = support.match(url, patron=r'(?:<source type="[^"]+"\s*src=|file:\s*)"([^"]+)"', headers=headers, debug=False).matches
for link in links.matches: for link in links:
itemlist.append( itemlist.append(
support.Item(channel=item.channel, support.Item(channel=item.channel,
action="play", action="play",
@@ -136,7 +142,7 @@ def findvideos(item):
show=item.show, show=item.show,
contentType=item.contentType, contentType=item.contentType,
folder=False)) folder=False))
return support.server(item, links, itemlist=itemlist) return support.server(item, itemlist=itemlist)
+1
View File
@@ -482,6 +482,7 @@ class UnshortenIt(object):
def _unshorten_vcrypt(self, uri): def _unshorten_vcrypt(self, uri):
uri = uri.replace('.net','.pw')
try: try:
headers = {} headers = {}
if 'myfoldersakstream.php' in uri or '/verys/' in uri: if 'myfoldersakstream.php' in uri or '/verys/' in uri:
+6 -3
View File
@@ -229,9 +229,8 @@ def open_settings():
from specials import videolibrary from specials import videolibrary
from platformcode import xbmc_videolibrary from platformcode import xbmc_videolibrary
if settings_pre.get('downloadpath', None) != settings_post.get('downloadpath', None) and \ if settings_pre.get('downloadpath', None) != settings_post.get('downloadpath', None):
is_xbmc() and get_setting("videolibrary_kodi"): xbmc_videolibrary.update_sources(settings_post.get('downloadpath', None), settings_pre.get('downloadpath', None))
xbmc_videolibrary.update_sources(settings_pre.get('downloadpath', None), settings_post.get('downloadpath', None))
# si se ha cambiado la ruta de la videoteca llamamos a comprobar directorios para que lo cree y pregunte # si se ha cambiado la ruta de la videoteca llamamos a comprobar directorios para que lo cree y pregunte
# automaticamente si configurar la videoteca # automaticamente si configurar la videoteca
@@ -499,6 +498,10 @@ def verify_directories_created():
# si se crea el directorio # si se crea el directorio
filetools.mkdir(content_path) filetools.mkdir(content_path)
from platformcode import xbmc_videolibrary
xbmc_videolibrary.update_sources(get_setting("videolibrarypath"))
xbmc_videolibrary.update_sources(get_setting("downloadpath"))
try: try:
from core import scrapertools from core import scrapertools
# Buscamos el archivo addon.xml del skin activo # Buscamos el archivo addon.xml del skin activo
+4 -4
View File
@@ -153,7 +153,7 @@ def render_items(itemlist, parent_item):
return return
# if there's no item, add "no elements" item # if there's no item, add "no elements" item
if not len(itemlist): if not len(itemlist):
itemlist.append(Item(title=config.get_localized_string(60347))) itemlist.append(Item(title=config.get_localized_string(60347), thumbnail=get_thumb('nofolder.png')))
for item in itemlist: for item in itemlist:
item_url = item.tourl() item_url = item.tourl()
@@ -293,7 +293,7 @@ def render_items_old(itemlist, parent_item):
# Si no hay ningun item, mostramos un aviso # Si no hay ningun item, mostramos un aviso
if not len(itemlist): if not len(itemlist):
itemlist.append(Item(title=config.get_localized_string(60347))) itemlist.append(Item(title=config.get_localized_string(60347), thumbnail=get_thumb('nofolder.png')))
genre = False genre = False
if 'nero' in parent_item.title: if 'nero' in parent_item.title:
@@ -353,9 +353,9 @@ def render_items_old(itemlist, parent_item):
item.thumbnail = get_thumb("next.png") item.thumbnail = get_thumb("next.png")
elif 'add' in item.action: elif 'add' in item.action:
if 'pelicula' in item.action: if 'pelicula' in item.action:
item.thumbnail = get_thumb("videolibrary_movie.png") item.thumbnail = get_thumb("add_to_videolibrary.png")
elif 'serie' in item.action: elif 'serie' in item.action:
item.thumbnail = get_thumb("videolibrary_tvshow.png") item.thumbnail = get_thumb("add_to_videolibrary.png")
if (unify_enabled or force_unify) and parent_item.channel not in ['kodfavourites']: if (unify_enabled or force_unify) and parent_item.channel not in ['kodfavourites']:
# Formatear titulo con unify # Formatear titulo con unify
+31 -85
View File
@@ -884,6 +884,9 @@ def update_db(old_path, new_path, old_movies_folder, new_movies_folder, old_tvsh
p += 5 p += 5
progress.update(p, config.get_localized_string(20000), config.get_localized_string(80013)) progress.update(p, config.get_localized_string(20000), config.get_localized_string(80013))
progress.update(100)
xbmc.sleep(1000)
progress.close()
xbmc.executebuiltin('XBMC.ReloadSkin()') xbmc.executebuiltin('XBMC.ReloadSkin()')
@@ -961,6 +964,7 @@ def clean_db():
sql = 'DELETE from episode WHERE idEpisode=%s' % idEpisode sql = 'DELETE from episode WHERE idEpisode=%s' % idEpisode
nun_records, records = execute_sql_kodi(sql) nun_records, records = execute_sql_kodi(sql)
progress.update(100) progress.update(100)
xbmc.sleep(1000)
progress.close() progress.close()
xbmc.executebuiltin('XBMC.ReloadSkin()') xbmc.executebuiltin('XBMC.ReloadSkin()')
@@ -1030,112 +1034,52 @@ def execute_sql_kodi(sql):
return nun_records, records return nun_records, records
def add_sources(path): def update_sources(new='', old=''):
logger.info() logger.info()
if new == old: return True
try: try:
SOURCES_PATH = xbmc.translatePath("special://userdata/sources.xml") SOURCES_PATH = xbmc.translatePath("special://userdata/sources.xml")
if filetools.isfile(SOURCES_PATH):
if os.path.exists(SOURCES_PATH):
xmldoc = minidom.parse(SOURCES_PATH) xmldoc = minidom.parse(SOURCES_PATH)
else: else:
# Crear documento
xmldoc = minidom.Document() xmldoc = minidom.Document()
nodo_sources = xmldoc.createElement("sources") source_nodes = xmldoc.createElement("sources")
for type in ['programs', 'video', 'music', 'picture', 'files']: for type in ['programs', 'video', 'music', 'picture', 'files']:
nodo_type = xmldoc.createElement(type) nodo_type = xmldoc.createElement(type)
element_default = xmldoc.createElement("default") element_default = xmldoc.createElement("default")
element_default.setAttribute("pathversion", "1") element_default.setAttribute("pathversion", "1")
nodo_type.appendChild(element_default) nodo_type.appendChild(element_default)
nodo_sources.appendChild(nodo_type) source_nodes.appendChild(nodo_type)
xmldoc.appendChild(nodo_sources) xmldoc.appendChild(source_nodes)
# Buscamos el nodo video
nodo_video = xmldoc.childNodes[0].getElementsByTagName("video")[0]
# Buscamos el path dentro de los nodos_path incluidos en el nodo_video
nodos_paths = nodo_video.getElementsByTagName("path")
list_path = [p.firstChild.data for p in nodos_paths]
logger.debug(list_path)
if path in list_path:
logger.debug("The path %s already exists in sources.xml" % path)
return True
logger.debug("The path %s does not exist in sources.xml" % path)
# Si llegamos aqui es por q el path no esta en sources.xml, asi q lo incluimos
nodo_source = xmldoc.createElement("source")
# Nodo <name>
nodo_name = xmldoc.createElement("name")
sep = os.sep
if path.startswith("special://") or scrapertools.find_single_match(path, '(^\w+:\/\/)'):
sep = "/"
name = path
if path.endswith(sep):
name = path[:-1]
nodo_name.appendChild(xmldoc.createTextNode(name.rsplit(sep)[-1]))
nodo_source.appendChild(nodo_name)
# Nodo <path>
nodo_path = xmldoc.createElement("path")
nodo_path.setAttribute("pathversion", "1")
nodo_path.appendChild(xmldoc.createTextNode(path))
nodo_source.appendChild(nodo_path)
# Nodo <allowsharing>
nodo_allowsharing = xmldoc.createElement("allowsharing")
nodo_allowsharing.appendChild(xmldoc.createTextNode('true'))
nodo_source.appendChild(nodo_allowsharing)
# Añadimos <source> a <video>
nodo_video.appendChild(nodo_source)
# Guardamos los cambios
if not PY3:
filetools.write(SOURCES_PATH,
'\n'.join([x for x in xmldoc.toprettyxml().encode("utf-8").splitlines() if x.strip()]))
else:
filetools.write(SOURCES_PATH,
b'\n'.join([x for x in xmldoc.toprettyxml().encode("utf-8").splitlines() if x.strip()]),
vfs=False)
logger.debug("The path %s has been added to sources.xml" % path)
return True
except:
logger.debug("An error occurred. The path %s has not been added to sources.xml" % path)
return False
def update_sources(old, new=''):
logger.info()
if new == old: return
SOURCES_PATH = xbmc.translatePath("special://userdata/sources.xml")
if filetools.isfile(SOURCES_PATH):
xmldoc = minidom.parse(SOURCES_PATH)
# collect nodes # collect nodes
# nodes = xmldoc.getElementsByTagName("video") # nodes = xmldoc.getElementsByTagName("video")
video_node = xmldoc.childNodes[0].getElementsByTagName("video")[0] video_node = xmldoc.childNodes[0].getElementsByTagName("video")[0]
paths_node = video_node.getElementsByTagName("path") paths_node = video_node.getElementsByTagName("path")
# delete old path if old:
for node in paths_node: # delete old path
if node.firstChild.data == old: for node in paths_node:
parent = node.parentNode if node.firstChild.data == old:
remove = parent.parentNode parent = node.parentNode
remove.removeChild(parent) remove = parent.parentNode
remove.removeChild(parent)
# write changes # write changes
if sys.version_info[0] >= 3: #PY3 if sys.version_info[0] >= 3: #PY3
filetools.write(SOURCES_PATH, '\n'.join([x for x in xmldoc.toprettyxml().encode("utf-8").splitlines() if x.strip()])) filetools.write(SOURCES_PATH, '\n'.join([x for x in xmldoc.toprettyxml().encode("utf-8").splitlines() if x.strip()]))
else: else:
filetools.write(SOURCES_PATH, b'\n'.join([x for x in xmldoc.toprettyxml().encode("utf-8").splitlines() if x.strip()]), vfs=False) filetools.write(SOURCES_PATH, b'\n'.join([x for x in xmldoc.toprettyxml().encode("utf-8").splitlines() if x.strip()]), vfs=False)
logger.debug("The path %s has been removed from sources.xml" % old)
if new: if new:
# create new path # create new path
list_path = [p.firstChild.data for p in paths_node] list_path = [p.firstChild.data for p in paths_node]
if new in list_path: if new in list_path:
logger.info("The path %s already exists in sources.xml" % new) logger.info("The path %s already exists in sources.xml" % new)
return return True
logger.info("The path %s does not exist in sources.xml" % new) logger.info("The path %s does not exist in sources.xml" % new)
# if the path does not exist we create one # if the path does not exist we create one
@@ -1172,8 +1116,10 @@ def update_sources(old, new=''):
else: else:
filetools.write(SOURCES_PATH, b'\n'.join([x for x in xmldoc.toprettyxml().encode("utf-8").splitlines() if x.strip()]), vfs=False) filetools.write(SOURCES_PATH, b'\n'.join([x for x in xmldoc.toprettyxml().encode("utf-8").splitlines() if x.strip()]), vfs=False)
logger.debug("The path %s has been added to sources.xml" % new) logger.debug("The path %s has been added to sources.xml" % new)
else: return True
logger.debug("sources.xml not found!") except:
logger.debug("An error occurred. The path %s has not been added/updated to sources.xml" % old)
return False
def ask_set_content(silent=False): def ask_set_content(silent=False):
@@ -1182,8 +1128,8 @@ def ask_set_content(silent=False):
def do_config(custom=False): def do_config(custom=False):
if set_content("movie", True, custom) and set_content("tvshow", True, custom) and \ if set_content("movie", True, custom) and set_content("tvshow", True, custom) and \
add_sources(config.get_setting("videolibrarypath")) and \ update_sources(config.get_setting("videolibrarypath")) and \
add_sources(config.get_setting("downloadpath")): update_sources(config.get_setting("downloadpath")):
platformtools.dialog_ok(config.get_localized_string(80026), config.get_localized_string(70104)) platformtools.dialog_ok(config.get_localized_string(80026), config.get_localized_string(70104))
config.set_setting("videolibrary_kodi", True) config.set_setting("videolibrary_kodi", True)
update() update()
+2 -2
View File
@@ -58,7 +58,7 @@
<!-- Downloads --> <!-- Downloads -->
<category label="30153"> <category label="30153">
<setting id="downloadenabled" type="bool" label="70689" default="false"/> <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="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="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_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"/>
@@ -87,7 +87,7 @@
<setting id="video_thumbnail_type" type="select" label="70131" lvalues="70132|70133" default="1"/> <setting id="video_thumbnail_type" type="select" label="70131" lvalues="70132|70133" default="1"/>
<!-- View Mode--> <!-- View Mode-->
<setting label="70754" type="lsep"/> <setting label="70754" type="lsep"/>
<setting id="skin_name" label='Skin Name' type="text" default="skin.estuary" visible="false"/>> <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_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_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_movie" type="action" label="30122" action="RunPlugin(plugin://plugin.video.kod/?ew0KICAgICJhY3Rpb24iOiJ2aWV3X21vZGUiLA0KICAgICJjaGFubmVsIjoic2hvcnRjdXRzIiwNCgkidHlwZSI6Im1vdmllIg0KfQ==)" default= "Default, 0"/>
+1 -1
View File
@@ -52,7 +52,7 @@ TAG_TYPE = "Type"
def renumber(itemlist, item='', typography=''): def renumber(itemlist, item='', typography=''):
log() log()
dict_series = load(itemlist[0]) dict_series = load(itemlist[0]) if len(itemlist) > 0 else {}
if item: if item:
item.channel = item.from_channel if item.from_channel else item.channel item.channel = item.from_channel if item.from_channel else item.channel
+9 -9
View File
@@ -98,13 +98,13 @@ def mainlist(item):
set_category_context(new_item) set_category_context(new_item)
itemlist.append(new_item) itemlist.append(new_item)
if channel_language == "all": # if channel_language == "all":
# if list_canales['Italiano']: # # if list_canales['Italiano']:
thumbnail = get_thumb("channels_italian.png") # thumbnail = get_thumb("italian.png")
new_item = Item(channel=item.channel, action="novedades", extra="italiano", title=config.get_localized_string(70563), # new_item = Item(channel=item.channel, action="novedades", extra="italiano", title=config.get_localized_string(70563),
thumbnail=thumbnail) # thumbnail=thumbnail)
set_category_context(new_item) # set_category_context(new_item)
itemlist.append(new_item) # itemlist.append(new_item)
# if list_canales['Torrent']: # if list_canales['Torrent']:
# thumbnail = get_thumb("channels_torrent.png") # thumbnail = get_thumb("channels_torrent.png")
@@ -118,9 +118,9 @@ def mainlist(item):
thumbnail=thumbnail) thumbnail=thumbnail)
set_category_context(new_item) set_category_context(new_item)
itemlist.append(new_item) itemlist.append(new_item)
thumbnail = get_thumb("setting_0.png")
itemlist.append(Item(channel='shortcuts', action="SettingOnPosition", category=5, setting=0, itemlist.append(Item(channel='shortcuts', action="SettingOnPosition", category=5, setting=0,
title=typo(config.get_localized_string(70285), 'bold color kod'))) title=typo(config.get_localized_string(70285), 'bold color kod'), thumbnail=thumbnail))
return itemlist return itemlist
+9 -6
View File
@@ -31,7 +31,9 @@ def mainlist(item):
itemlist.append(Item(channel=item.channel, action="list_tvshows", title=config.get_localized_string(60600), itemlist.append(Item(channel=item.channel, action="list_tvshows", title=config.get_localized_string(60600),
category=config.get_localized_string(70271), category=config.get_localized_string(70271),
thumbnail=get_thumb("videolibrary_tvshow.png"))) thumbnail=get_thumb("videolibrary_tvshow.png")))
itemlist.append(Item(channel='shortcuts', action="SettingOnPosition", category=2, setting=0, title=typo(config.get_localized_string(70287),'bold color kod'))) itemlist.append(Item(channel='shortcuts', action="SettingOnPosition",
category=2, setting=0, title=typo(config.get_localized_string(70287),'bold color kod'),
thumbnail = get_thumb("setting_0.png")))
return itemlist return itemlist
@@ -719,13 +721,14 @@ 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: if current_path != new_path and not filetools.listdir(current_path) and not "plugin.video.kod\\videolibrary" in current_path:
filetools.rmdirtree(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"): if config.is_xbmc() and config.get_setting("videolibrary_kodi"):
from platformcode import xbmc_videolibrary
xbmc_videolibrary.update_sources(backup_current_path, backup_new_path)
xbmc_videolibrary.update_db(backup_current_path, backup_new_path, current_movies_folder, new_movies_folder, current_tvshows_folder, new_tvshows_folder, progress) xbmc_videolibrary.update_db(backup_current_path, backup_new_path, current_movies_folder, new_movies_folder, current_tvshows_folder, new_tvshows_folder, progress)
else:
progress.update(100) progress.update(100)
progress.close() xbmc.sleep(1000)
progress.close()
if notify: if notify:
platformtools.dialog_notification(config.get_localized_string(20000), config.get_localized_string(80014), icon=0, time=5000, sound=False) platformtools.dialog_notification(config.get_localized_string(20000), config.get_localized_string(80014), icon=0, time=5000, sound=False)