Fix YT, sezione serietv raiplay

This commit is contained in:
marco
2023-03-23 20:35:09 +01:00
parent d8743fc956
commit 3e0e7f535d
2 changed files with 9 additions and 3 deletions

View File

@@ -23,8 +23,8 @@ def mainlist(item):
('Replay {bold}', ['/guidatv', 'replayMenu', '/guidatv.json'])]
menu = [('Film {bullet bold}', ['/film', 'menu', '/tipologia/film/index.json']),
('Serie TV {bullet bold}', ['/serietv', 'menu', '/tipologia/serietv/index.json']),
('Fiction {bullet bold}', ['/fiction', 'menu', '/tipologia/fiction/index.json']),
('Serie italiane {bullet bold}', ['/serietv', 'menu', '/tipologia/serieitaliane/index.json']),
# ('Fiction {bullet bold}', ['/fiction', 'menu', '/tipologia/fiction/index.json']),
('Documentari {bullet bold}', ['/documentari', 'menu', '/tipologia/documentari/index.json']),
('Programmi TV{bullet bold}', ['/programmi', 'menu', '/tipologia/programmi/index.json']),
('Programmi per Bambini {bullet bold}', ['/bambini', 'menu', '/tipologia/bambini/index.json']),

View File

@@ -1,6 +1,6 @@
# s-*- coding: utf-8 -*-
import xbmc, xbmcaddon, sys, re
from core import httptools, scrapertools, filetools
from core import httptools, scrapertools, filetools, support
from platformcode import config, logger, platformtools
name = 'plugin.video.youtube'
@@ -42,6 +42,12 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
my_addon = xbmcaddon.Addon('plugin.video.youtube')
addon_dir = xbmc.translatePath( my_addon.getAddonInfo('path') )
sys.path.append(filetools.join( addon_dir, 'resources', 'lib' ) )
# load all dependencies for yt addon
dependencies = support.match(filetools.read(filetools.join(addon_dir, 'addon.xml')), patron=r'addon="([^"]+)').matches
for dep in dependencies:
sys.path.append(filetools.join(config.get_runtime_path(), '..', dep, 'lib'))
sys.path.append(filetools.join(config.get_runtime_path(), '..', dep, 'resources', 'modules'))
from youtube_resolver import resolve
try:
for stream in resolve(page_url):