- Fix VVVVID
- Ricerca Informazioni in sezione Novità - Fix Toonitalia - Fix Voci sottomenu CB01 e aggiunto tag 3D, se presente - Fix episodio successivo per episodi > 100 - Fix Community Channels - Selezione scraper (TMDb TvShows default)
This commit is contained in:
@@ -36,8 +36,7 @@
|
||||
"streamingita": "https://www.streamingita.cloud",
|
||||
"streamtime": "https://t.me/s/StreamTime",
|
||||
"tantifilm": "https://www.tantifilm.nl",
|
||||
"toonitalia": "https://toonitalia.co",
|
||||
"vvvvid": "https://www.vvvvid.it/forbidden.html"
|
||||
"toonitalia": "https://toonitalia.co"
|
||||
},
|
||||
"findhost": {
|
||||
"altadefinizione": "https://altadefinizione.nuovo.live",
|
||||
|
||||
@@ -45,8 +45,9 @@ def mainlist(item):
|
||||
|
||||
@support.scrape
|
||||
def menu(item):
|
||||
# debug=True
|
||||
patronBlock = item.args + r'<span.*?><\/span>.*?<ul.*?>(?P<block>.*?)<\/ul>'
|
||||
patronMenu = r'href="?(?P<url>[^">]+)"?>(?P<title>.*?)<\/a>'
|
||||
patronMenu = r'href="?(?P<url>[^">]+)"?>(?P<title>[^<»]+)'
|
||||
action = 'peliculas'
|
||||
|
||||
return locals()
|
||||
@@ -104,14 +105,14 @@ def peliculas(item):
|
||||
pagination = ''
|
||||
patronBlock = r'sequex-page-left(?P<block>.*?)sequex-page-right'
|
||||
if '/serietv/' not in item.url:
|
||||
patron = r'src="?(?P<thumb>[^ "]+)"? alt="?(?P<title>.*?)(?:\[(?P<quality>[a-zA-Z/]+)\]\s*)?(?:\[(?P<lang>Sub-ITA|ITA)\]\s*)?(?:\[(?P<quality2>[a-zA-Z/]+)\]\s*)?\((?P<year>\d{4})[^\)]*\)[^>]*>.*?<a href=(?:")?(?P<url>[^" ]+)(?:")?.*?rpwe-summary[^>]*>(?P<genre>\w+) [^ ]+ DURATA (?P<duration>[0-9]+)[^ ]+ [^ ]+ [A-Z ]+ (?P<plot>[^<]+)<'
|
||||
patron = r'src="?(?P<thumb>[^ "]+)"? alt="?(?P<title>.*?)(?:\[(?P<quality>[a-zA-Z]+(?:[/]?3D)?)\]\s*)?(?:\[(?P<lang>Sub-ITA|ITA)\]\s*)?(?:\[(?P<quality2>[a-zA-Z]+(?:[/]?3D)?)\]\s*)?\((?P<year>\d{4})[^\)]*\)[^>]*>.*?<a href=(?:")?(?P<url>[^" ]+)(?:")?.*?rpwe-summary[^>]*>(?P<genre>\w+) [^ ]+ DURATA (?P<duration>[0-9]+)[^ ]+ [^ ]+ [A-Z ]+ (?P<plot>[^<]+)<'
|
||||
action = 'findvideos'
|
||||
else:
|
||||
patron = r'src=(?:")?(?P<thumb>[^ "]+)(?:")? alt=(?:")?(?P<title>.*?)(?: – \d+×\d+)?(?:>|"| – )(?:(?P<lang>Sub-ITA|ITA))?[^>]*>.*?<a href=(?:")?(?P<url>[^" ]+)(?:")?.*?rpwe-summary[^>]*>(?P<genre>[^\(]*)\((?P<year>\d{4})[^\)]*\) (?P<plot>[^<]+)<'
|
||||
action = 'episodios'
|
||||
|
||||
elif '/serietv/' not in item.url:
|
||||
patron = r'(?<!sticky )hentry.*?<div class="card-image">\s*<a[^>]+>\s*<img src="(?P<thumb>[^" ]+)" alt[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+><a href="?(?P<url>[^" >]+)(?:\/|"|\s+)>(?P<title>[^<[(]+)(?:\[(?P<quality>[a-zA-Z/]+)\]\s*)?(?:\[(?P<lang>Sub-ITA|ITA)\]\s*)?(?:\[(?P<quality2>[a-zA-Z/]+)\]\s*)? (?:\((?P<year>[0-9]{4})\))?[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<genre>[^<>&âÃÂÖ]+)(?:[^ ]+\s*DURATA\s*(?P<duration>[0-9]+)[^>]+>[^>]+>[^>]+>(?P<plot>[^<>]+))?'
|
||||
patron = r'(?<!sticky )hentry.*?<div class="card-image">\s*<a[^>]+>\s*<img src="(?P<thumb>[^" ]+)" alt[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+><a href="?(?P<url>[^" >]+)(?:\/|"|\s+)>(?P<title>[^<[(]+)(?:\[(?P<quality>[a-zA-Z]+(?:[/]?3D)?)\]\s*)?(?:\[(?P<lang>Sub-ITA|ITA)\]\s*)?(?:\[(?P<quality2>[a-zA-Z/]+)\]\s*)? (?:\((?P<year>[0-9]{4})\))?[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<genre>[^<>&âÃÂÖ]+)(?:[^ ]+\s*DURATA\s*(?P<duration>[0-9]+)[^>]+>[^>]+>[^>]+>(?P<plot>[^<>]+))?'
|
||||
action = 'findvideos'
|
||||
|
||||
else:
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Canale per ToonItalia
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import scrapertools, support
|
||||
from core import httptools, scrapertools, support
|
||||
import sys
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
@@ -90,24 +90,39 @@ def peliculas(item):
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
anime = True
|
||||
# debug = True
|
||||
patron = r'>\s*(?:(?P<season>\d+)(?:×|x|×))?(?P<episode>\d+)(?:\s+–\s+)?[ –]+(?P<title2>[^<]+)[ –]+<a (?P<data>.*?)(?:<br|</p)'
|
||||
# data = ''
|
||||
# match = support.match(item, headers=headers, patron=r'(?: /> |<p>)(?:(?P<season>\d+)×)?(?P<episode>\d+)(?:\s+–\s+)?(?P<title>[^<]+)<a (?P<data>.*?)(?:<br|</p)').matches
|
||||
# if match:
|
||||
# for m in match:
|
||||
# data += '{}{:02d}|{}|{}|'.format(m[0]+'x' if m[0] else '', int(m[1]), clean_title(m[2]), m[3])
|
||||
#
|
||||
# patron = r'(?P<episode>[^|]+)\|(?P<title>[^|]+)\|(?P<data>[^|]+)\|'
|
||||
@support.scrape
|
||||
def findepisode(item):
|
||||
anime = True
|
||||
actLike = 'episodios'
|
||||
patron = r'>\s*(?:(?P<season>\d+)(?:×|x|×))?(?P<episode>\d+)(?:\s+–\s+)?[ –]+(?P<title2>[^<]+)[ –]+<a (?P<data>.*?)(?:<br|</p)'
|
||||
return locals()
|
||||
|
||||
return locals()
|
||||
itemlist = findepisode(item)
|
||||
if itemlist: return itemlist
|
||||
else: return [item.clone(action='findvideos')]
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
return support.server(item, item.data if item.contentType != 'movie' else support.match(item.url, headers=headers).data )
|
||||
servers = []
|
||||
itemlist = []
|
||||
|
||||
if item.data:
|
||||
data = item.data
|
||||
else:
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
matches =support.match(data, patron='href="([^"]+)[^>]+>([^<\d]+)(\d+p)?').matches
|
||||
if matches:
|
||||
for match in matches:
|
||||
itemlist.append(item.clone(server=match[1].strip().lower(), quality=match[2], url=match[0]))
|
||||
if itemlist:
|
||||
servers = support.server(item, itemlist=itemlist)
|
||||
else:
|
||||
servvers = support.server(item, data=data)
|
||||
return servers
|
||||
|
||||
# return support.server(item, item.data if item.contentType != 'movie' else support.match(item.url, headers=headers).data )
|
||||
|
||||
|
||||
def clean_title(title):
|
||||
|
||||
@@ -8,7 +8,7 @@ import requests, sys, inspect
|
||||
from core import support, tmdb, httptools
|
||||
from platformcode import autorenumber, logger, config
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
host = 'https://www.vvvvid.it'
|
||||
|
||||
# Creating persistent session
|
||||
current_session = requests.Session()
|
||||
|
||||
@@ -211,7 +211,7 @@ def cleantitle(title):
|
||||
if type(title) != str: title.decode('UTF-8')
|
||||
title = scrapertools.unescape(title)
|
||||
title = scrapertools.decodeHtmlentities(title)
|
||||
cleantitle = title.replace('"', "'").replace('×', 'x').replace('–', '-').strip()
|
||||
cleantitle = title.replace('"', "'").replace('×', 'x').replace('–', '-').strip().strip('-').strip()
|
||||
return cleantitle
|
||||
|
||||
|
||||
@@ -509,7 +509,7 @@ def scrape(func):
|
||||
# info('STACK= ',inspect.stack()[1][3])
|
||||
item = args['item']
|
||||
|
||||
action = args.get('action', 'findvideos')
|
||||
action = args.get('action', 'episodios' if item.contentType == 'tvshow' and function != 'episodios' else 'findvideos')
|
||||
anime = args.get('anime', '')
|
||||
addVideolibrary = args.get('addVideolibrary', True)
|
||||
search = args.get('search', '')
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# XBMC Launcher (xbmc / kodi)
|
||||
# ------------------------------------------------------------
|
||||
|
||||
import sys
|
||||
import sys, xbmc
|
||||
from core.item import Item
|
||||
from core import filetools
|
||||
from platformcode import config, logger, platformtools
|
||||
@@ -22,7 +22,7 @@ def start():
|
||||
try:
|
||||
with open(config.changelogFile, 'r') as fileC:
|
||||
changelog = fileC.read()
|
||||
if changelog.strip():
|
||||
if changelog.strip() and config.get_setting("addon_update_message"):
|
||||
platformtools.dialog_ok('Kodi on Demand', 'Aggiornamenti applicati:\n' + changelog)
|
||||
filetools.remove(config.changelogFile)
|
||||
except:
|
||||
@@ -86,7 +86,6 @@ def run(item=None):
|
||||
elif item.action == "open_browser":
|
||||
import webbrowser
|
||||
if not webbrowser.open(item.url):
|
||||
import xbmc
|
||||
if xbmc.getCondVisibility('system.platform.linux') and xbmc.getCondVisibility('system.platform.android'): # android
|
||||
xbmc.executebuiltin('StartAndroidActivity("", "android.intent.action.VIEW", "", "%s")' % item.url)
|
||||
else:
|
||||
@@ -96,7 +95,6 @@ def run(item=None):
|
||||
elif item.action == "gotopage":
|
||||
page = platformtools.dialog_numeric(0, config.get_localized_string(70513))
|
||||
if page:
|
||||
import xbmc
|
||||
item.action = item.real_action
|
||||
if item.page:
|
||||
item.page = int(page)
|
||||
@@ -374,7 +372,6 @@ def actions(item):
|
||||
if not token_auth:
|
||||
trakt_tools.auth_trakt()
|
||||
else:
|
||||
import xbmc
|
||||
if not xbmc.getCondVisibility('System.HasAddon(script.trakt)') and config.get_setting('install_trakt'):
|
||||
trakt_tools.ask_install_script()
|
||||
itemlist = trakt_tools.trakt_check(itemlist)
|
||||
|
||||
@@ -42,8 +42,10 @@ def mark_auto_as_watched(item):
|
||||
next_dialogs = ['NextDialog.xml', 'NextDialogExtended.xml', 'NextDialogCompact.xml']
|
||||
next_ep_type = config.get_setting('next_ep_type')
|
||||
ND = next_dialogs[next_ep_type]
|
||||
try: next_episode = next_ep(item)
|
||||
except: next_episode = False
|
||||
try:
|
||||
next_episode = next_ep(item)
|
||||
except:
|
||||
next_episode = False
|
||||
logger.debug(next_episode)
|
||||
|
||||
while not xbmc.Monitor().abortRequested():
|
||||
@@ -611,115 +613,29 @@ def set_content(content_type, silent=False, custom=False):
|
||||
msg_text = ""
|
||||
videolibrarypath = config.get_setting("videolibrarypath")
|
||||
|
||||
if content_type == 'movie':
|
||||
scraper = [config.get_localized_string(70093), config.get_localized_string(70096)]
|
||||
if not custom:
|
||||
seleccion = 0 # tmdb
|
||||
scraper = []
|
||||
values = []
|
||||
# from core.support import dbg;dbg()
|
||||
rpc = '{ "jsonrpc": "2.0", "method": "Addons.GetAddons","params":{"type":"xbmc.metadata.scraper.' + content_type + 's", "properties":["name"]}, "id": "1"}'
|
||||
response = jsontools.load(xbmc.executeJSONRPC(rpc))['result']['addons']
|
||||
for r in response:
|
||||
scraper.append(r['name'])
|
||||
values.append(r['addonid'])
|
||||
if not custom:
|
||||
if content_type == 'movie':
|
||||
seleccion = values.index('metadata.themoviedb.org')
|
||||
else:
|
||||
seleccion = platformtools.dialog_select(config.get_localized_string(70094), scraper)
|
||||
seleccion = values.index('metadata.tvshows.themoviedb.org.python')
|
||||
else:
|
||||
seleccion = platformtools.dialog_select(config.get_localized_string(70094), scraper)
|
||||
|
||||
# Configure scraper
|
||||
if seleccion != -1:
|
||||
xbmc.executebuiltin(f'Addon.OpenSettings({values[seleccion]})', True)
|
||||
else:
|
||||
continuar = False
|
||||
|
||||
|
||||
# Instalar The Movie Database
|
||||
if seleccion == -1 or seleccion == 0:
|
||||
if not xbmc.getCondVisibility('System.HasAddon(metadata.themoviedb.org)'):
|
||||
if not silent:
|
||||
# Ask if we want to install metadata.themoviedb.org
|
||||
install = platformtools.dialog_yesno(config.get_localized_string(60046),'')
|
||||
else:
|
||||
install = True
|
||||
|
||||
if install:
|
||||
try:
|
||||
# Install metadata.themoviedb.org
|
||||
xbmc.executebuiltin('InstallAddon(metadata.themoviedb.org)', True)
|
||||
logger.debug("Instalado el Scraper de películas de TheMovieDB")
|
||||
except:
|
||||
pass
|
||||
|
||||
continuar = (install and xbmc.getCondVisibility('System.HasAddon(metadata.themoviedb.org)'))
|
||||
if not continuar:
|
||||
msg_text = config.get_localized_string(60047)
|
||||
if continuar:
|
||||
xbmc.executebuiltin('Addon.OpenSettings(metadata.themoviedb.org)', True)
|
||||
|
||||
# Instalar Universal Movie Scraper
|
||||
elif seleccion == 1:
|
||||
if continuar and not xbmc.getCondVisibility('System.HasAddon(metadata.universal)'):
|
||||
continuar = False
|
||||
if not silent:
|
||||
# Ask if we want to install metadata.universal
|
||||
install = platformtools.dialog_yesno(config.get_localized_string(70095),'')
|
||||
else:
|
||||
install = True
|
||||
|
||||
if install:
|
||||
try:
|
||||
xbmc.executebuiltin('InstallAddon(metadata.universal)', True)
|
||||
if xbmc.getCondVisibility('System.HasAddon(metadata.universal)'):
|
||||
continuar = True
|
||||
except:
|
||||
pass
|
||||
|
||||
continuar = (install and continuar)
|
||||
if not continuar:
|
||||
msg_text = config.get_localized_string(70097)
|
||||
if continuar:
|
||||
xbmc.executebuiltin('Addon.OpenSettings(metadata.universal)', True)
|
||||
|
||||
else: # SERIES
|
||||
scraper = [config.get_localized_string(70093), config.get_localized_string(70098)]
|
||||
if not custom:
|
||||
seleccion = 0 # tmdb
|
||||
else:
|
||||
seleccion = platformtools.dialog_select(config.get_localized_string(70107), scraper)
|
||||
|
||||
# Instalar The Movie Database
|
||||
if seleccion == -1 or seleccion == 0:
|
||||
if continuar and not xbmc.getCondVisibility('System.HasAddon(metadata.tvshows.themoviedb.org)'):
|
||||
continuar = False
|
||||
if not silent:
|
||||
# Ask if we want to install metadata.tvshows.themoviedb.org
|
||||
install = platformtools.dialog_yesno(config.get_localized_string(60050),'')
|
||||
else:
|
||||
install = True
|
||||
|
||||
if install:
|
||||
try:
|
||||
# Install metadata.tvshows.themoviedb.org
|
||||
xbmc.executebuiltin('InstallAddon(metadata.tvshows.themoviedb.org)', True)
|
||||
if xbmc.getCondVisibility('System.HasAddon(metadata.tvshows.themoviedb.org)'):
|
||||
continuar = True
|
||||
except:
|
||||
pass
|
||||
|
||||
continuar = (install and continuar)
|
||||
if not continuar:
|
||||
msg_text = config.get_localized_string(60051)
|
||||
if continuar:
|
||||
xbmc.executebuiltin('Addon.OpenSettings(metadata.tvshows.themoviedb.org)', True)
|
||||
|
||||
# Instalar The TVDB
|
||||
elif seleccion == 1:
|
||||
if not xbmc.getCondVisibility('System.HasAddon(metadata.tvdb.com)'):
|
||||
if not silent:
|
||||
#Ask if we want to install metadata.tvdb.com
|
||||
install = platformtools.dialog_yesno(config.get_localized_string(60048),'')
|
||||
else:
|
||||
install = True
|
||||
|
||||
if install:
|
||||
try:
|
||||
# Install metadata.tvdb.com
|
||||
xbmc.executebuiltin('InstallAddon(metadata.tvdb.com)', True)
|
||||
logger.debug("The TVDB series Scraper installed ")
|
||||
except:
|
||||
pass
|
||||
|
||||
continuar = (install and xbmc.getCondVisibility('System.HasAddon(metadata.tvdb.com)'))
|
||||
if not continuar:
|
||||
msg_text = config.get_localized_string(60049)
|
||||
if continuar:
|
||||
xbmc.executebuiltin('Addon.OpenSettings(metadata.tvdb.com)', True)
|
||||
|
||||
idPath = 0
|
||||
idParentPath = 0
|
||||
@@ -774,12 +690,8 @@ def set_content(content_type, silent=False, custom=False):
|
||||
if content_type == 'movie':
|
||||
strContent = 'movies'
|
||||
scanRecursive = 2147483647
|
||||
if seleccion == -1 or seleccion == 0:
|
||||
strScraper = 'metadata.themoviedb.org'
|
||||
path_settings = xbmc.translatePath("special://profile/addon_data/metadata.themoviedb.org/settings.xml")
|
||||
elif seleccion == 1:
|
||||
strScraper = 'metadata.universal'
|
||||
path_settings = xbmc.translatePath("special://profile/addon_data/metadata.universal/settings.xml")
|
||||
strScraper = values[seleccion]
|
||||
path_settings = xbmc.translatePath(f"special://profile/addon_data/{strScraper}/settings.xml")
|
||||
if not os.path.exists(path_settings):
|
||||
logger.debug("%s: %s" % (content_type, path_settings + " doesn't exist"))
|
||||
return continuar
|
||||
@@ -793,12 +705,8 @@ def set_content(content_type, silent=False, custom=False):
|
||||
else:
|
||||
strContent = 'tvshows'
|
||||
scanRecursive = 0
|
||||
if seleccion == -1 or seleccion == 0:
|
||||
strScraper = 'metadata.tvshows.themoviedb.org'
|
||||
path_settings = xbmc.translatePath("special://profile/addon_data/metadata.tvshows.themoviedb.org/settings.xml")
|
||||
elif seleccion == 1:
|
||||
strScraper = 'metadata.tvdb.com'
|
||||
path_settings = xbmc.translatePath("special://profile/addon_data/metadata.tvdb.com/settings.xml")
|
||||
strScraper = values[seleccion]
|
||||
path_settings = xbmc.translatePath(f"special://profile/addon_data/{strScraper}/settings.xml")
|
||||
if not os.path.exists(path_settings):
|
||||
logger.debug("%s: %s" % (content_type, path_settings + " doesn't exist"))
|
||||
return continuar
|
||||
@@ -1273,9 +1181,10 @@ def update_sources(new='', old=''):
|
||||
|
||||
|
||||
def ask_set_content(silent=False):
|
||||
# from core.support import dbg;dbg()
|
||||
logger.debug()
|
||||
logger.debug("videolibrary_kodi %s" % config.get_setting("videolibrary_kodi"))
|
||||
def do_config(custom=False):
|
||||
def do_config(custom=True):
|
||||
if set_content("movie", True, custom) and set_content("tvshow", True, custom):
|
||||
platformtools.dialog_ok(config.get_localized_string(80026), config.get_localized_string(70104))
|
||||
config.set_setting("videolibrary_kodi", True)
|
||||
@@ -1324,7 +1233,7 @@ def ask_set_content(silent=False):
|
||||
# configuration from the settings menu
|
||||
else:
|
||||
platformtools.dialog_ok(config.get_localized_string(80026), config.get_localized_string(80023))
|
||||
do_config(False)
|
||||
do_config(True)
|
||||
|
||||
|
||||
def next_ep(item):
|
||||
@@ -1333,39 +1242,39 @@ def next_ep(item):
|
||||
item.next_ep = False
|
||||
|
||||
# check if next file exist
|
||||
current_filename = filetools.basename(item.strm_path)
|
||||
current_filename = filetools.basename(item.strm_path).replace('.strm', '')
|
||||
base_path = filetools.basename(filetools.dirname(item.strm_path))
|
||||
path = filetools.join(config.get_videolibrary_path(), config.get_setting("folder_tvshows"),base_path)
|
||||
fileList = []
|
||||
for file in filetools.listdir(path):
|
||||
if file.endswith('.strm'):
|
||||
fileList.append(file)
|
||||
fileList.sort()
|
||||
fileList.append(file.replace('.strm', ''))
|
||||
|
||||
fileList.sort(key=lambda ep: (int(ep.split('x')[0]), int(ep.split('x')[1])))
|
||||
|
||||
nextIndex = fileList.index(current_filename) + 1
|
||||
if nextIndex == 0 or nextIndex == len(fileList): next_file = None
|
||||
else: next_file = fileList[nextIndex]
|
||||
else: next_file = fileList[nextIndex]
|
||||
logger.debug('Next File:' + str(next_file))
|
||||
|
||||
# start next episode window afther x time
|
||||
if next_file:
|
||||
season_ep = next_file.split('.')[0]
|
||||
season = season_ep.split('x')[0]
|
||||
episode = season_ep.split('x')[1]
|
||||
next_ep = '%sx%s' % (season, episode)
|
||||
season = int(next_file.split('x')[0])
|
||||
episode = int(next_file.split('x')[1])
|
||||
# next_ep = '%sx%s' % (season, episode)
|
||||
item = Item(
|
||||
action= 'play_from_library',
|
||||
channel= 'videolibrary',
|
||||
contentEpisodeNumber= episode,
|
||||
contentSeason= season,
|
||||
contentTitle= next_ep,
|
||||
contentTitle= next_file,
|
||||
contentType= 'episode',
|
||||
infoLabels= {'episode': episode, 'mediatype': 'episode', 'season': season, 'title': next_ep},
|
||||
strm_path= filetools.join(base_path, next_file),
|
||||
infoLabels= {'episode': episode, 'mediatype': 'episode', 'season': season, 'title': next_file},
|
||||
strm_path= filetools.join(base_path, next_file + '.strm'),
|
||||
play_from = item.play_from)
|
||||
|
||||
global INFO
|
||||
INFO = filetools.join(path, next_file.replace("strm", "nfo"))
|
||||
INFO = filetools.join(path, next_file + '.nfo')
|
||||
else:
|
||||
item=None
|
||||
|
||||
@@ -1394,7 +1303,10 @@ class NextDialog(xbmcgui.WindowXMLDialog):
|
||||
else: img = filetools.join(config.get_runtime_path(), "resources", "noimage.png")
|
||||
self.setProperty("next_img", img)
|
||||
self.setProperty("title", info["tvshowtitle"])
|
||||
self.setProperty("ep_title", "%dx%02d - %s" % (info["season"], info["episode"], info.get("title",'')))
|
||||
ep_title = f'{info["season"]}x{info["episode"]:02d}'
|
||||
if info.get("title",''):
|
||||
ep_title += f' - {info["title"]}'
|
||||
self.setProperty("ep_title", ep_title)
|
||||
self.show()
|
||||
|
||||
def set_exit(self, EXIT):
|
||||
|
||||
@@ -6139,6 +6139,10 @@ msgctxt "#70834"
|
||||
msgid "Playlist"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#70835"
|
||||
msgid "Search information from TMDB..."
|
||||
msgstr ""
|
||||
|
||||
# DNS start [ settings and declaration ]
|
||||
msgctxt "#707401"
|
||||
msgid "Enable DNS check alert"
|
||||
|
||||
@@ -6140,6 +6140,10 @@ msgctxt "#70834"
|
||||
msgid "Playlist"
|
||||
msgstr "Playlist"
|
||||
|
||||
msgctxt "#70835"
|
||||
msgid "Search information from TMDB..."
|
||||
msgstr "Ricerca informazioni da TMDB..."
|
||||
|
||||
# DNS start [ settings and declaration ]
|
||||
msgctxt "#707401"
|
||||
msgid "Enable DNS check alert"
|
||||
|
||||
@@ -31,7 +31,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
bloque = scrapertools.find_single_match(data, "sources.*?\}")
|
||||
video_srcs = scrapertools.find_multiple_matches(bloque, ': "([^"]+)')
|
||||
for url in video_srcs:
|
||||
video_urls.append([" [Voe]", url])
|
||||
video_urls.append([url.split('.')[-1] + " [Voe]", url])
|
||||
|
||||
return video_urls
|
||||
|
||||
|
||||
@@ -178,6 +178,9 @@ def peliculas(item, json='', key='', itemlist=[]):
|
||||
|
||||
# logger.debug('DEBUG:', json)
|
||||
|
||||
if item.sort:
|
||||
json.sort(key=lambda x: x.get('title', ''), reverse=False)
|
||||
|
||||
infoLabels = item.infoLabels if item.infoLabels else {}
|
||||
contentType = 'tvshow' if 'tvshow' in key else 'movie'
|
||||
itlist = filterkey = []
|
||||
@@ -237,8 +240,8 @@ def peliculas(item, json='', key='', itemlist=[]):
|
||||
tmdb.set_infoLabels(itlist, seekTmdb=True)
|
||||
itemlist += itlist
|
||||
|
||||
if item.sort:
|
||||
itemlist.sort(key=lambda x: x.title.lower(), reverse=False)
|
||||
# if item.sort:
|
||||
# itemlist.sort(key=lambda x: x.title.lower(), reverse=False)
|
||||
if Pagination and len(itemlist) >= Pagination:
|
||||
if inspect.stack()[1][3] != 'get_newest':
|
||||
item.title = support.typo(config.get_localized_string(30992), 'color kod bold')
|
||||
@@ -725,6 +728,7 @@ def load_and_check(item):
|
||||
# set extra values
|
||||
def set_extra_values(item, json, path):
|
||||
logger.debug()
|
||||
# support.dbg()
|
||||
ret = Item()
|
||||
for key in json:
|
||||
if key == 'quality':
|
||||
@@ -740,7 +744,7 @@ def set_extra_values(item, json, path):
|
||||
elif key == 'fanart':
|
||||
ret.fanart = json[key] if ':/' in json[key] else filetools.join(path, json[key])
|
||||
elif key in ['url', 'link']:
|
||||
ret.url = json[key] if ':/' in json[key] or type(json[key]) == dict else filetools.join(path, json[key])
|
||||
ret.url = json[key] if ':/' in json[key] or type(json[key]) in (dict, OrderedDict) else filetools.join(path, json[key])
|
||||
elif key == 'seasons_list':
|
||||
ret.url = {}
|
||||
ret.url['seasons_list'] = json['seasons_list']
|
||||
|
||||
@@ -1,44 +1,51 @@
|
||||
{
|
||||
"id": "news",
|
||||
"name": "Novedades",
|
||||
"active": false,
|
||||
"language": ["*"],
|
||||
"categories": [
|
||||
"movie"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "multithread",
|
||||
"type": "bool",
|
||||
"label": "@60656",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "result_mode",
|
||||
"type": "list",
|
||||
"label": "@60657",
|
||||
"default": 2,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"@60658",
|
||||
"@60659",
|
||||
"@60660"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "order",
|
||||
"type": "list",
|
||||
"label": "Ordinamento",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"Default",
|
||||
"Alfabetico"
|
||||
]
|
||||
}
|
||||
]
|
||||
"id": "news",
|
||||
"name": "Novedades",
|
||||
"active": false,
|
||||
"language": ["*"],
|
||||
"categories": [
|
||||
"movie"
|
||||
],
|
||||
"settings": [{
|
||||
"id": "multithread",
|
||||
"type": "bool",
|
||||
"label": "@60656",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "result_mode",
|
||||
"type": "list",
|
||||
"label": "@60657",
|
||||
"default": 2,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"@60658",
|
||||
"@60659",
|
||||
"@60660"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "order",
|
||||
"type": "list",
|
||||
"label": "Ordinamento",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"Default",
|
||||
"Alfabetico"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "tmdb",
|
||||
"type": "bool",
|
||||
"label": "Cerca informazioni su TMDB",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -15,7 +15,7 @@ import glob, os, re, time
|
||||
from threading import Thread
|
||||
|
||||
from channelselector import get_thumb, auto_filter
|
||||
from core import channeltools, jsontools, scrapertools, support
|
||||
from core import channeltools, jsontools, scrapertools, support, tmdb
|
||||
from core.item import Item
|
||||
from platformcode import config, logger, platformtools
|
||||
|
||||
@@ -52,7 +52,7 @@ def mainlist(item):
|
||||
|
||||
#if list_canales['peliculas']:
|
||||
thumbnail = get_thumb("movie.png")
|
||||
new_item = Item(channel=item.channel, action="novedades", extra="peliculas", title=config.get_localized_string(30122),
|
||||
new_item = Item(channel=item.channel, action="novedades", contentType='movie', extra="peliculas", title=config.get_localized_string(30122),
|
||||
thumbnail=thumbnail)
|
||||
|
||||
set_category_context(new_item)
|
||||
@@ -80,14 +80,14 @@ def mainlist(item):
|
||||
|
||||
#if list_canales['series']:
|
||||
thumbnail = get_thumb("tvshow.png")
|
||||
new_item = Item(channel=item.channel, action="novedades", extra="series", title=config.get_localized_string(60511),
|
||||
new_item = Item(channel=item.channel, action="novedades", contentType='tvshow', extra="series", title=config.get_localized_string(60511),
|
||||
thumbnail=thumbnail)
|
||||
set_category_context(new_item)
|
||||
itemlist.append(new_item)
|
||||
|
||||
#if list_canales['anime']:
|
||||
thumbnail = get_thumb("anime.png")
|
||||
new_item = Item(channel=item.channel, action="novedades", extra="anime", title=config.get_localized_string(60512),
|
||||
new_item = Item(channel=item.channel, action="novedades", contentType='tvshow', extra="anime", title=config.get_localized_string(60512),
|
||||
thumbnail=thumbnail)
|
||||
set_category_context(new_item)
|
||||
itemlist.append(new_item)
|
||||
@@ -319,6 +319,9 @@ def novedades(item):
|
||||
result_mode = config.get_setting("result_mode", "news")
|
||||
if mode != 'normal':
|
||||
result_mode=0
|
||||
if config.get_setting("tmdb", "news"):
|
||||
progreso.update(100, config.get_localized_string(70835))
|
||||
tmdb.set_infoLabels_itemlist(list_newest, seekTmdb=True)
|
||||
|
||||
if result_mode == 0: # Grouped by content
|
||||
ret = group_by_content(list_newest)
|
||||
|
||||
Reference in New Issue
Block a user