alcuni fix
This commit is contained in:
@@ -297,16 +297,21 @@ def findvideos(item, itemlist=[]):
|
|||||||
p_dialog = platformtools.dialog_progress_bg(config.get_localized_string(20000), config.get_localized_string(60683))
|
p_dialog = platformtools.dialog_progress_bg(config.get_localized_string(20000), config.get_localized_string(60683))
|
||||||
p_dialog.update(0)
|
p_dialog.update(0)
|
||||||
|
|
||||||
# First checks if channel has a "findvideos" function
|
try:
|
||||||
if hasattr(channel, 'findvideos'):
|
# First checks if channel has a "findvideos" function
|
||||||
itemlist = getattr(channel, item.action)(item)
|
if hasattr(channel, 'findvideos'):
|
||||||
|
itemlist = getattr(channel, item.action)(item)
|
||||||
|
|
||||||
# If not, uses the generic findvideos function
|
# If not, uses the generic findvideos function
|
||||||
else:
|
else:
|
||||||
logger.debug('No channel "findvideos" method, executing core method')
|
logger.debug('No channel "findvideos" method, executing core method')
|
||||||
itemlist = servertools.find_video_items(item)
|
itemlist = servertools.find_video_items(item)
|
||||||
|
|
||||||
itemlist = limitItemlist(itemlist)
|
itemlist = limitItemlist(itemlist)
|
||||||
|
except Exception as ex:
|
||||||
|
template = "An exception of type %s occured. Arguments:\n%r"
|
||||||
|
message = template % (type(ex).__name__, ex.args)
|
||||||
|
logger.error(" %s" % message)
|
||||||
|
|
||||||
p_dialog.update(100)
|
p_dialog.update(100)
|
||||||
p_dialog.close()
|
p_dialog.close()
|
||||||
|
|||||||
@@ -1892,7 +1892,8 @@ def serverWindow(item, itemlist):
|
|||||||
from platformcode.launcher import run
|
from platformcode.launcher import run
|
||||||
run(selection)
|
run(selection)
|
||||||
reopen = True
|
reopen = True
|
||||||
if not selection.server: return
|
if not selection.server or selection.server == 'torrent': return
|
||||||
|
|
||||||
db.close()
|
db.close()
|
||||||
import threading
|
import threading
|
||||||
threading.Thread(target=monitor, args=[itemlist]).start()
|
threading.Thread(target=monitor, args=[itemlist]).start()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from core import httptools
|
from core import httptools, support
|
||||||
from platformcode import logger, config
|
from platformcode import logger, config
|
||||||
|
|
||||||
|
|
||||||
@@ -19,8 +19,13 @@ def test_video_exists(page_url):
|
|||||||
|
|
||||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||||
logger.info("(page_url='%s')" % page_url)
|
logger.info("(page_url='%s')" % page_url)
|
||||||
|
video_urls = []
|
||||||
data = response.json
|
data = response.json
|
||||||
|
|
||||||
url = data.get('qualities', {}).get('auto', [{}])[0].get('url','')
|
url = data.get('qualities', {}).get('auto', [{}])[0].get('url','')
|
||||||
|
|
||||||
return [["m3u8 [dailymotion]", url]]
|
urls = support.match(url, patron=r'NAME="([^"]+)"\s*,\s*PROGRESSIVE-URI="([^"]+)').matches
|
||||||
|
for quality, uri in urls:
|
||||||
|
video_urls.append(["mp4 [{}p] [dailymotion]".format(quality), uri])
|
||||||
|
|
||||||
|
return video_urls
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
"ignore_urls": [],
|
"ignore_urls": [],
|
||||||
"patterns": [
|
"patterns": [
|
||||||
{
|
{
|
||||||
"pattern": "(http[s]?:\\/\\/(?:[a-zA-Z0-9]+)\\.torrent)",
|
"pattern": "(https?:\/\/\\S+.torrent)",
|
||||||
"url": "\\1"
|
"url": "\\1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user