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
|
||||
break
|
||||
else:
|
||||
support.dbg()
|
||||
# support.dbg()
|
||||
data = url
|
||||
|
||||
return support.servertools.find_video_items(item, data=data)
|
||||
|
||||
@@ -132,7 +132,7 @@ def SettingOnPosition(item):
|
||||
|
||||
|
||||
def select(item):
|
||||
from core.support import dbg;dbg()
|
||||
# from core.support import dbg;dbg()
|
||||
from platformcode import config, platformtools
|
||||
# item.id = setting ID
|
||||
# item.type = labels or values
|
||||
|
||||
@@ -235,23 +235,25 @@ def new_search(item):
|
||||
|
||||
def live(item):
|
||||
import sys
|
||||
import channelselector
|
||||
|
||||
if sys.version_info[0] >= 3:
|
||||
from concurrent import futures
|
||||
else:
|
||||
from concurrent_py2 import futures
|
||||
itemlist = []
|
||||
channels_dict = {}
|
||||
channels = ['raiplay', 'mediasetplay', 'la7', 'paramount']
|
||||
channels = channelselector.filterchannels('live')
|
||||
|
||||
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):
|
||||
if res.result():
|
||||
channel_name, itlist = res.result()
|
||||
channel_name, itlist = res.rFesult()
|
||||
channels_dict[channel_name] = itlist
|
||||
|
||||
for channel in channels:
|
||||
itemlist += channels_dict[channel]
|
||||
for ch in channels:
|
||||
itemlist += channels_dict[ch.channel]
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user