rebase specials

This commit is contained in:
marco
2020-02-05 20:51:06 +01:00
parent 53b1436e68
commit 1ddf563e0a
17 changed files with 884 additions and 255 deletions
Executable → Regular
+14 -7
View File
@@ -3,6 +3,14 @@
# -*- Created for Alfa-addon -*-
# -*- By the Alfa Develop Group -*-
from __future__ import division
from builtins import range
from past.utils import old_div
#from builtins import str
import sys
PY3 = False
if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int
import os, json, time, inspect, channelselector
from lib.concurrent import futures
from core.item import Item
@@ -206,7 +214,7 @@ def channel_search(item):
if finished in searching:
searching_titles.remove(searching_titles[searching.index(finished)])
searching.remove(finished)
progress.update((cnt * 100) / len(channel_list), config.get_localized_string(70744) % str(len(channel_list) - cnt),
progress.update(old_div((cnt * 100), len(channel_list)), config.get_localized_string(70744) % str(len(channel_list) - cnt),
str(searching_titles))
progress.close()
@@ -221,7 +229,7 @@ def channel_search(item):
ch_name = channel_titles[channel_list.index(key)]
grouped = list()
cnt += 1
progress.update((cnt * 100) / len(ch_list), config.get_localized_string(60295), config.get_localized_string(60293))
progress.update(old_div((cnt * 100), len(ch_list)), config.get_localized_string(60295), config.get_localized_string(60293))
if len(value) <= max_results and item.mode != 'all':
if len(value) == 1:
if not value[0].action or config.get_localized_string(70006).lower() in value[0].title.lower():
@@ -292,9 +300,8 @@ def get_channel_results(ch, item, session):
ch_params = channeltools.get_channel_parameters(ch)
exec("from channels import " + ch_params["channel"] + " as module")
mainlist = module.mainlist(Item(channel=ch_params["channel"]))
module = __import__('channels.%s' % ch_params["channel"], fromlist=["channels.%s" % ch_params["channel"]])
mainlist = getattr(module, 'mainlist')(Item(channel=ch_params["channel"]))
search_action = [elem for elem in mainlist if elem.action == "search" and (item.mode == 'all' or elem.contentType == item.mode)]
if search_action:
@@ -431,7 +438,7 @@ def setting_channel_new(item):
elif presel_values[ret] == 'none':
preselect = []
elif presel_values[ret] == 'all':
preselect = range(len(ids))
preselect = list(range(len(ids)))
elif presel_values[ret] in ['cast', 'lat']:
preselect = []
for i, lg in enumerate(lista_lang):
@@ -488,7 +495,7 @@ def genres_menu(item):
mode = item.mode.replace('show', '')
genres = tmdb.get_genres(mode)
for key, value in genres[mode].items():
for key, value in list(genres[mode].items()):
discovery = {'url': 'discover/%s' % mode, 'with_genres': key,
'language': def_lang, 'page': '1'}