canali live legati alla sezione apposita
This commit is contained in:
@@ -307,7 +307,7 @@ def play(item):
|
|||||||
data = support.match(sec_data, patron=r'<video src="([^"]+)').match
|
data = support.match(sec_data, patron=r'<video src="([^"]+)').match
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
support.dbg()
|
# support.dbg()
|
||||||
data = url
|
data = url
|
||||||
|
|
||||||
return support.servertools.find_video_items(item, data=data)
|
return support.servertools.find_video_items(item, data=data)
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ def SettingOnPosition(item):
|
|||||||
|
|
||||||
|
|
||||||
def select(item):
|
def select(item):
|
||||||
from core.support import dbg;dbg()
|
# from core.support import dbg;dbg()
|
||||||
from platformcode import config, platformtools
|
from platformcode import config, platformtools
|
||||||
# item.id = setting ID
|
# item.id = setting ID
|
||||||
# item.type = labels or values
|
# item.type = labels or values
|
||||||
|
|||||||
@@ -235,23 +235,25 @@ def new_search(item):
|
|||||||
|
|
||||||
def live(item):
|
def live(item):
|
||||||
import sys
|
import sys
|
||||||
|
import channelselector
|
||||||
|
|
||||||
if sys.version_info[0] >= 3:
|
if sys.version_info[0] >= 3:
|
||||||
from concurrent import futures
|
from concurrent import futures
|
||||||
else:
|
else:
|
||||||
from concurrent_py2 import futures
|
from concurrent_py2 import futures
|
||||||
itemlist = []
|
itemlist = []
|
||||||
channels_dict = {}
|
channels_dict = {}
|
||||||
channels = ['raiplay', 'mediasetplay', 'la7', 'paramount']
|
channels = channelselector.filterchannels('live')
|
||||||
|
|
||||||
with futures.ThreadPoolExecutor() as executor:
|
with futures.ThreadPoolExecutor() as executor:
|
||||||
itlist = [executor.submit(load_live, channel) for channel in channels]
|
itlist = [executor.submit(load_live, ch.channel) for ch in channels]
|
||||||
for res in futures.as_completed(itlist):
|
for res in futures.as_completed(itlist):
|
||||||
if res.result():
|
if res.result():
|
||||||
channel_name, itlist = res.result()
|
channel_name, itlist = res.rFesult()
|
||||||
channels_dict[channel_name] = itlist
|
channels_dict[channel_name] = itlist
|
||||||
|
|
||||||
for channel in channels:
|
for ch in channels:
|
||||||
itemlist += channels_dict[channel]
|
itemlist += channels_dict[ch.channel]
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user