- 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:
Alhaziel01
2022-07-12 11:22:40 +02:00
parent ad20a975e9
commit 1b1e65f7d7
13 changed files with 158 additions and 212 deletions

View File

@@ -36,8 +36,7 @@
"streamingita": "https://www.streamingita.cloud", "streamingita": "https://www.streamingita.cloud",
"streamtime": "https://t.me/s/StreamTime", "streamtime": "https://t.me/s/StreamTime",
"tantifilm": "https://www.tantifilm.nl", "tantifilm": "https://www.tantifilm.nl",
"toonitalia": "https://toonitalia.co", "toonitalia": "https://toonitalia.co"
"vvvvid": "https://www.vvvvid.it/forbidden.html"
}, },
"findhost": { "findhost": {
"altadefinizione": "https://altadefinizione.nuovo.live", "altadefinizione": "https://altadefinizione.nuovo.live",

View File

@@ -45,8 +45,9 @@ def mainlist(item):
@support.scrape @support.scrape
def menu(item): def menu(item):
# debug=True
patronBlock = item.args + r'<span.*?><\/span>.*?<ul.*?>(?P<block>.*?)<\/ul>' 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' action = 'peliculas'
return locals() return locals()
@@ -104,14 +105,14 @@ def peliculas(item):
pagination = '' pagination = ''
patronBlock = r'sequex-page-left(?P<block>.*?)sequex-page-right' patronBlock = r'sequex-page-left(?P<block>.*?)sequex-page-right'
if '/serietv/' not in item.url: 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' action = 'findvideos'
else: else:
patron = r'src=(?:")?(?P<thumb>[^ "]+)(?:")? alt=(?:")?(?P<title>.*?)(?: &#8211; \d+&#215;\d+)?(?:>|"| &#8211; )(?:(?P<lang>Sub-ITA|ITA))?[^>]*>.*?<a href=(?:")?(?P<url>[^" ]+)(?:")?.*?rpwe-summary[^>]*>(?P<genre>[^\(]*)\((?P<year>\d{4})[^\)]*\) (?P<plot>[^<]+)<' patron = r'src=(?:")?(?P<thumb>[^ "]+)(?:")? alt=(?:")?(?P<title>.*?)(?: &#8211; \d+&#215;\d+)?(?:>|"| &#8211; )(?:(?P<lang>Sub-ITA|ITA))?[^>]*>.*?<a href=(?:")?(?P<url>[^" ]+)(?:")?.*?rpwe-summary[^>]*>(?P<genre>[^\(]*)\((?P<year>\d{4})[^\)]*\) (?P<plot>[^<]+)<'
action = 'episodios' action = 'episodios'
elif '/serietv/' not in item.url: 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' action = 'findvideos'
else: else:

View File

@@ -3,7 +3,7 @@
# Canale per ToonItalia # Canale per ToonItalia
# ------------------------------------------------------------ # ------------------------------------------------------------
from core import scrapertools, support from core import httptools, scrapertools, support
import sys import sys
host = support.config.get_channel_url() host = support.config.get_channel_url()
@@ -90,24 +90,39 @@ def peliculas(item):
return locals() return locals()
@support.scrape
def episodios(item): def episodios(item):
anime = True @support.scrape
# debug = True def findepisode(item):
patron = r'>\s*(?:(?P<season>\d+)(?:&#215;|x|×))?(?P<episode>\d+)(?:\s+&#8211;\s+)?[ ]+(?P<title2>[^<]+)[ ]+<a (?P<data>.*?)(?:<br|</p)' anime = True
# data = '' actLike = 'episodios'
# match = support.match(item, headers=headers, patron=r'(?: /> |<p>)(?:(?P<season>\d+)&#215;)?(?P<episode>\d+)(?:\s+&#8211;\s+)?(?P<title>[^<]+)<a (?P<data>.*?)(?:<br|</p)').matches patron = r'>\s*(?:(?P<season>\d+)(?:&#215;|x|×))?(?P<episode>\d+)(?:\s+&#8211;\s+)?[ ]+(?P<title2>[^<]+)[ ]+<a (?P<data>.*?)(?:<br|</p)'
# if match: return locals()
# 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>[^|]+)\|'
return locals() itemlist = findepisode(item)
if itemlist: return itemlist
else: return [item.clone(action='findvideos')]
def findvideos(item): 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): def clean_title(title):

View File

@@ -8,7 +8,7 @@ import requests, sys, inspect
from core import support, tmdb, httptools from core import support, tmdb, httptools
from platformcode import autorenumber, logger, config from platformcode import autorenumber, logger, config
host = support.config.get_channel_url() host = 'https://www.vvvvid.it'
# Creating persistent session # Creating persistent session
current_session = requests.Session() current_session = requests.Session()

View File

@@ -211,7 +211,7 @@ def cleantitle(title):
if type(title) != str: title.decode('UTF-8') if type(title) != str: title.decode('UTF-8')
title = scrapertools.unescape(title) title = scrapertools.unescape(title)
title = scrapertools.decodeHtmlentities(title) title = scrapertools.decodeHtmlentities(title)
cleantitle = title.replace('"', "'").replace('×', 'x').replace('', '-').strip() cleantitle = title.replace('"', "'").replace('×', 'x').replace('', '-').strip().strip('-').strip()
return cleantitle return cleantitle
@@ -509,7 +509,7 @@ def scrape(func):
# info('STACK= ',inspect.stack()[1][3]) # info('STACK= ',inspect.stack()[1][3])
item = args['item'] 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', '') anime = args.get('anime', '')
addVideolibrary = args.get('addVideolibrary', True) addVideolibrary = args.get('addVideolibrary', True)
search = args.get('search', '') search = args.get('search', '')

View File

@@ -3,7 +3,7 @@
# XBMC Launcher (xbmc / kodi) # XBMC Launcher (xbmc / kodi)
# ------------------------------------------------------------ # ------------------------------------------------------------
import sys import sys, xbmc
from core.item import Item from core.item import Item
from core import filetools from core import filetools
from platformcode import config, logger, platformtools from platformcode import config, logger, platformtools
@@ -22,7 +22,7 @@ def start():
try: try:
with open(config.changelogFile, 'r') as fileC: with open(config.changelogFile, 'r') as fileC:
changelog = fileC.read() 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) platformtools.dialog_ok('Kodi on Demand', 'Aggiornamenti applicati:\n' + changelog)
filetools.remove(config.changelogFile) filetools.remove(config.changelogFile)
except: except:
@@ -86,7 +86,6 @@ def run(item=None):
elif item.action == "open_browser": elif item.action == "open_browser":
import webbrowser import webbrowser
if not webbrowser.open(item.url): if not webbrowser.open(item.url):
import xbmc
if xbmc.getCondVisibility('system.platform.linux') and xbmc.getCondVisibility('system.platform.android'): # android if xbmc.getCondVisibility('system.platform.linux') and xbmc.getCondVisibility('system.platform.android'): # android
xbmc.executebuiltin('StartAndroidActivity("", "android.intent.action.VIEW", "", "%s")' % item.url) xbmc.executebuiltin('StartAndroidActivity("", "android.intent.action.VIEW", "", "%s")' % item.url)
else: else:
@@ -96,7 +95,6 @@ def run(item=None):
elif item.action == "gotopage": elif item.action == "gotopage":
page = platformtools.dialog_numeric(0, config.get_localized_string(70513)) page = platformtools.dialog_numeric(0, config.get_localized_string(70513))
if page: if page:
import xbmc
item.action = item.real_action item.action = item.real_action
if item.page: if item.page:
item.page = int(page) item.page = int(page)
@@ -374,7 +372,6 @@ def actions(item):
if not token_auth: if not token_auth:
trakt_tools.auth_trakt() trakt_tools.auth_trakt()
else: else:
import xbmc
if not xbmc.getCondVisibility('System.HasAddon(script.trakt)') and config.get_setting('install_trakt'): if not xbmc.getCondVisibility('System.HasAddon(script.trakt)') and config.get_setting('install_trakt'):
trakt_tools.ask_install_script() trakt_tools.ask_install_script()
itemlist = trakt_tools.trakt_check(itemlist) itemlist = trakt_tools.trakt_check(itemlist)

View File

@@ -42,8 +42,10 @@ def mark_auto_as_watched(item):
next_dialogs = ['NextDialog.xml', 'NextDialogExtended.xml', 'NextDialogCompact.xml'] next_dialogs = ['NextDialog.xml', 'NextDialogExtended.xml', 'NextDialogCompact.xml']
next_ep_type = config.get_setting('next_ep_type') next_ep_type = config.get_setting('next_ep_type')
ND = next_dialogs[next_ep_type] ND = next_dialogs[next_ep_type]
try: next_episode = next_ep(item) try:
except: next_episode = False next_episode = next_ep(item)
except:
next_episode = False
logger.debug(next_episode) logger.debug(next_episode)
while not xbmc.Monitor().abortRequested(): while not xbmc.Monitor().abortRequested():
@@ -611,115 +613,29 @@ def set_content(content_type, silent=False, custom=False):
msg_text = "" msg_text = ""
videolibrarypath = config.get_setting("videolibrarypath") videolibrarypath = config.get_setting("videolibrarypath")
if content_type == 'movie': scraper = []
scraper = [config.get_localized_string(70093), config.get_localized_string(70096)] values = []
if not custom: # from core.support import dbg;dbg()
seleccion = 0 # tmdb 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: 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 idPath = 0
idParentPath = 0 idParentPath = 0
@@ -774,12 +690,8 @@ def set_content(content_type, silent=False, custom=False):
if content_type == 'movie': if content_type == 'movie':
strContent = 'movies' strContent = 'movies'
scanRecursive = 2147483647 scanRecursive = 2147483647
if seleccion == -1 or seleccion == 0: strScraper = values[seleccion]
strScraper = 'metadata.themoviedb.org' path_settings = xbmc.translatePath(f"special://profile/addon_data/{strScraper}/settings.xml")
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")
if not os.path.exists(path_settings): if not os.path.exists(path_settings):
logger.debug("%s: %s" % (content_type, path_settings + " doesn't exist")) logger.debug("%s: %s" % (content_type, path_settings + " doesn't exist"))
return continuar return continuar
@@ -793,12 +705,8 @@ def set_content(content_type, silent=False, custom=False):
else: else:
strContent = 'tvshows' strContent = 'tvshows'
scanRecursive = 0 scanRecursive = 0
if seleccion == -1 or seleccion == 0: strScraper = values[seleccion]
strScraper = 'metadata.tvshows.themoviedb.org' path_settings = xbmc.translatePath(f"special://profile/addon_data/{strScraper}/settings.xml")
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")
if not os.path.exists(path_settings): if not os.path.exists(path_settings):
logger.debug("%s: %s" % (content_type, path_settings + " doesn't exist")) logger.debug("%s: %s" % (content_type, path_settings + " doesn't exist"))
return continuar return continuar
@@ -1273,9 +1181,10 @@ def update_sources(new='', old=''):
def ask_set_content(silent=False): def ask_set_content(silent=False):
# from core.support import dbg;dbg()
logger.debug() logger.debug()
logger.debug("videolibrary_kodi %s" % config.get_setting("videolibrary_kodi")) 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): 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)) 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)
@@ -1324,7 +1233,7 @@ def ask_set_content(silent=False):
# configuration from the settings menu # configuration from the settings menu
else: else:
platformtools.dialog_ok(config.get_localized_string(80026), config.get_localized_string(80023)) platformtools.dialog_ok(config.get_localized_string(80026), config.get_localized_string(80023))
do_config(False) do_config(True)
def next_ep(item): def next_ep(item):
@@ -1333,39 +1242,39 @@ def next_ep(item):
item.next_ep = False item.next_ep = False
# check if next file exist # 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)) base_path = filetools.basename(filetools.dirname(item.strm_path))
path = filetools.join(config.get_videolibrary_path(), config.get_setting("folder_tvshows"),base_path) path = filetools.join(config.get_videolibrary_path(), config.get_setting("folder_tvshows"),base_path)
fileList = [] fileList = []
for file in filetools.listdir(path): for file in filetools.listdir(path):
if file.endswith('.strm'): if file.endswith('.strm'):
fileList.append(file) fileList.append(file.replace('.strm', ''))
fileList.sort()
fileList.sort(key=lambda ep: (int(ep.split('x')[0]), int(ep.split('x')[1])))
nextIndex = fileList.index(current_filename) + 1 nextIndex = fileList.index(current_filename) + 1
if nextIndex == 0 or nextIndex == len(fileList): next_file = None 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)) logger.debug('Next File:' + str(next_file))
# start next episode window afther x time # start next episode window afther x time
if next_file: if next_file:
season_ep = next_file.split('.')[0] season = int(next_file.split('x')[0])
season = season_ep.split('x')[0] episode = int(next_file.split('x')[1])
episode = season_ep.split('x')[1] # next_ep = '%sx%s' % (season, episode)
next_ep = '%sx%s' % (season, episode)
item = Item( item = Item(
action= 'play_from_library', action= 'play_from_library',
channel= 'videolibrary', channel= 'videolibrary',
contentEpisodeNumber= episode, contentEpisodeNumber= episode,
contentSeason= season, contentSeason= season,
contentTitle= next_ep, contentTitle= next_file,
contentType= 'episode', contentType= 'episode',
infoLabels= {'episode': episode, 'mediatype': 'episode', 'season': season, 'title': next_ep}, infoLabels= {'episode': episode, 'mediatype': 'episode', 'season': season, 'title': next_file},
strm_path= filetools.join(base_path, next_file), strm_path= filetools.join(base_path, next_file + '.strm'),
play_from = item.play_from) play_from = item.play_from)
global INFO global INFO
INFO = filetools.join(path, next_file.replace("strm", "nfo")) INFO = filetools.join(path, next_file + '.nfo')
else: else:
item=None item=None
@@ -1394,7 +1303,10 @@ class NextDialog(xbmcgui.WindowXMLDialog):
else: img = filetools.join(config.get_runtime_path(), "resources", "noimage.png") else: img = filetools.join(config.get_runtime_path(), "resources", "noimage.png")
self.setProperty("next_img", img) self.setProperty("next_img", img)
self.setProperty("title", info["tvshowtitle"]) 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() self.show()
def set_exit(self, EXIT): def set_exit(self, EXIT):

View File

@@ -6139,6 +6139,10 @@ msgctxt "#70834"
msgid "Playlist" msgid "Playlist"
msgstr "" msgstr ""
msgctxt "#70835"
msgid "Search information from TMDB..."
msgstr ""
# DNS start [ settings and declaration ] # DNS start [ settings and declaration ]
msgctxt "#707401" msgctxt "#707401"
msgid "Enable DNS check alert" msgid "Enable DNS check alert"

View File

@@ -6140,6 +6140,10 @@ msgctxt "#70834"
msgid "Playlist" msgid "Playlist"
msgstr "Playlist" msgstr "Playlist"
msgctxt "#70835"
msgid "Search information from TMDB..."
msgstr "Ricerca informazioni da TMDB..."
# DNS start [ settings and declaration ] # DNS start [ settings and declaration ]
msgctxt "#707401" msgctxt "#707401"
msgid "Enable DNS check alert" msgid "Enable DNS check alert"

View File

@@ -31,7 +31,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
bloque = scrapertools.find_single_match(data, "sources.*?\}") bloque = scrapertools.find_single_match(data, "sources.*?\}")
video_srcs = scrapertools.find_multiple_matches(bloque, ': "([^"]+)') video_srcs = scrapertools.find_multiple_matches(bloque, ': "([^"]+)')
for url in video_srcs: for url in video_srcs:
video_urls.append([" [Voe]", url]) video_urls.append([url.split('.')[-1] + " [Voe]", url])
return video_urls return video_urls

View File

@@ -178,6 +178,9 @@ def peliculas(item, json='', key='', itemlist=[]):
# logger.debug('DEBUG:', json) # logger.debug('DEBUG:', json)
if item.sort:
json.sort(key=lambda x: x.get('title', ''), reverse=False)
infoLabels = item.infoLabels if item.infoLabels else {} infoLabels = item.infoLabels if item.infoLabels else {}
contentType = 'tvshow' if 'tvshow' in key else 'movie' contentType = 'tvshow' if 'tvshow' in key else 'movie'
itlist = filterkey = [] itlist = filterkey = []
@@ -237,8 +240,8 @@ def peliculas(item, json='', key='', itemlist=[]):
tmdb.set_infoLabels(itlist, seekTmdb=True) tmdb.set_infoLabels(itlist, seekTmdb=True)
itemlist += itlist itemlist += itlist
if item.sort: # if item.sort:
itemlist.sort(key=lambda x: x.title.lower(), reverse=False) # itemlist.sort(key=lambda x: x.title.lower(), reverse=False)
if Pagination and len(itemlist) >= Pagination: if Pagination and len(itemlist) >= Pagination:
if inspect.stack()[1][3] != 'get_newest': if inspect.stack()[1][3] != 'get_newest':
item.title = support.typo(config.get_localized_string(30992), 'color kod bold') item.title = support.typo(config.get_localized_string(30992), 'color kod bold')
@@ -725,6 +728,7 @@ def load_and_check(item):
# set extra values # set extra values
def set_extra_values(item, json, path): def set_extra_values(item, json, path):
logger.debug() logger.debug()
# support.dbg()
ret = Item() ret = Item()
for key in json: for key in json:
if key == 'quality': if key == 'quality':
@@ -740,7 +744,7 @@ def set_extra_values(item, json, path):
elif key == 'fanart': elif key == 'fanart':
ret.fanart = json[key] if ':/' in json[key] else filetools.join(path, json[key]) ret.fanart = json[key] if ':/' in json[key] else filetools.join(path, json[key])
elif key in ['url', 'link']: 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': elif key == 'seasons_list':
ret.url = {} ret.url = {}
ret.url['seasons_list'] = json['seasons_list'] ret.url['seasons_list'] = json['seasons_list']

View File

@@ -1,44 +1,51 @@
{ {
"id": "news", "id": "news",
"name": "Novedades", "name": "Novedades",
"active": false, "active": false,
"language": ["*"], "language": ["*"],
"categories": [ "categories": [
"movie" "movie"
], ],
"settings": [ "settings": [{
{ "id": "multithread",
"id": "multithread", "type": "bool",
"type": "bool", "label": "@60656",
"label": "@60656", "default": true,
"default": true, "enabled": true,
"enabled": true, "visible": true
"visible": true },
}, {
{ "id": "result_mode",
"id": "result_mode", "type": "list",
"type": "list", "label": "@60657",
"label": "@60657", "default": 2,
"default": 2, "enabled": true,
"enabled": true, "visible": true,
"visible": true, "lvalues": [
"lvalues": [ "@60658",
"@60658", "@60659",
"@60659", "@60660"
"@60660" ]
] },
}, {
{ "id": "order",
"id": "order", "type": "list",
"type": "list", "label": "Ordinamento",
"label": "Ordinamento", "default": 0,
"default": 0, "enabled": true,
"enabled": true, "visible": true,
"visible": true, "lvalues": [
"lvalues": [ "Default",
"Default", "Alfabetico"
"Alfabetico" ]
] },
} {
] "id": "tmdb",
"type": "bool",
"label": "Cerca informazioni su TMDB",
"default": true,
"enabled": true,
"visible": true
}
]
} }

View File

@@ -15,7 +15,7 @@ import glob, os, re, time
from threading import Thread from threading import Thread
from channelselector import get_thumb, auto_filter 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 core.item import Item
from platformcode import config, logger, platformtools from platformcode import config, logger, platformtools
@@ -52,7 +52,7 @@ def mainlist(item):
#if list_canales['peliculas']: #if list_canales['peliculas']:
thumbnail = get_thumb("movie.png") 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) thumbnail=thumbnail)
set_category_context(new_item) set_category_context(new_item)
@@ -80,14 +80,14 @@ def mainlist(item):
#if list_canales['series']: #if list_canales['series']:
thumbnail = get_thumb("tvshow.png") 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) thumbnail=thumbnail)
set_category_context(new_item) set_category_context(new_item)
itemlist.append(new_item) itemlist.append(new_item)
#if list_canales['anime']: #if list_canales['anime']:
thumbnail = get_thumb("anime.png") 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) thumbnail=thumbnail)
set_category_context(new_item) set_category_context(new_item)
itemlist.append(new_item) itemlist.append(new_item)
@@ -319,6 +319,9 @@ def novedades(item):
result_mode = config.get_setting("result_mode", "news") result_mode = config.get_setting("result_mode", "news")
if mode != 'normal': if mode != 'normal':
result_mode=0 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 if result_mode == 0: # Grouped by content
ret = group_by_content(list_newest) ret = group_by_content(list_newest)