- Miglioria NinjaStream

- Fix Vup
This commit is contained in:
Alhaziel01
2021-06-01 11:42:29 +02:00
parent 5e29d761e1
commit 78c354ac71
3 changed files with 11 additions and 9 deletions
+6 -6
View File
@@ -1002,12 +1002,6 @@ def play_video(item, strm=False, force_direct=False, autoplay=False):
# if it is a video in mpd format, the listitem is configured to play it ith the inpustreamaddon addon implemented in Kodi 17
# from core.support import dbg;dbg()
if item.manifest == 'hls' or mediaurl.endswith('m3u8'):
if not install_inputstream():
return
xlistitem.setProperty('inputstream' if PY3 else 'inputstreamaddon', 'inputstream.adaptive')
xlistitem.setProperty('inputstream.adaptive.manifest_type', 'hls')
xlistitem.setMimeType('application/x-mpegURL')
if mpd or item.manifest =='mpd':
if not install_inputstream():
return
@@ -1018,6 +1012,12 @@ def play_video(item, strm=False, force_direct=False, autoplay=False):
xlistitem.setProperty("inputstream.adaptive.license_type", item.drm)
xlistitem.setProperty("inputstream.adaptive.license_key", item.license)
xlistitem.setMimeType('application/dash+xml')
elif item.manifest == 'hls' or mediaurl.split('|')[0].endswith('m3u8'):
if not install_inputstream():
return
xlistitem.setProperty('inputstream' if PY3 else 'inputstreamaddon', 'inputstream.adaptive')
xlistitem.setProperty('inputstream.adaptive.manifest_type', 'hls')
xlistitem.setMimeType('application/x-mpegURL')
if force_direct: item.play_from = 'window'
+3 -1
View File
@@ -19,6 +19,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
global data
logger.debug("URL", page_url)
video_urls = []
# support.dbg()
headers = {'User-Agent': httptools.get_user_agent(),
'Referer': page_url,
@@ -30,9 +31,10 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
data = httptools.downloadpage(apiUrl, headers=headers, post=post).json
if data.get('result',{}).get('playlist'):
# support.dbg()
url = data.get('result',{}).get('playlist')
video_urls.append([url.split('.')[-1], url])
video_urls.append([url.split('.')[-1], url + '|Referer:' + page_url])
return video_urls
+2 -2
View File
@@ -4,8 +4,8 @@
"ignore_urls": [],
"patterns": [
{
"pattern": "(?:vupload.com|vup.to)/((?:embed-)?[a-z0-9]+)",
"url": "https://vupload.com/\\1.html"
"pattern": "(?:vupload.com|vup.to)/((?:embed-|e/)?[a-z0-9]+)",
"url": "https://vupload.com/\\1"
}
]
},