Merge remote-tracking branch 'origin/master'
This commit is contained in:
+4
-3
@@ -979,6 +979,7 @@ def controls(itemlist, item, AutoPlay=True, CheckLinks=True, down_load=True):
|
|||||||
channel_node = autoplay_node.get(item.channel, {})
|
channel_node = autoplay_node.get(item.channel, {})
|
||||||
settings_node = channel_node.get('settings', {})
|
settings_node = channel_node.get('settings', {})
|
||||||
AP = get_setting('autoplay') or settings_node['active']
|
AP = get_setting('autoplay') or settings_node['active']
|
||||||
|
APS = get_setting('autoplay_server_list')
|
||||||
|
|
||||||
if CL and not AP:
|
if CL and not AP:
|
||||||
if get_setting('checklinks', item.channel):
|
if get_setting('checklinks', item.channel):
|
||||||
@@ -991,7 +992,7 @@ def controls(itemlist, item, AutoPlay=True, CheckLinks=True, down_load=True):
|
|||||||
checklinks_number = get_setting('checklinks_number')
|
checklinks_number = get_setting('checklinks_number')
|
||||||
itemlist = servertools.check_list_links(itemlist, checklinks_number)
|
itemlist = servertools.check_list_links(itemlist, checklinks_number)
|
||||||
|
|
||||||
if AutoPlay == True and inspect.stack()[3][3] not in ['download_from_best_server', 'select_server']:
|
if AutoPlay == True and not 'downloads' in inspect.stack()[3][1] + inspect.stack()[4][1]:
|
||||||
autoplay.start(itemlist, item)
|
autoplay.start(itemlist, item)
|
||||||
|
|
||||||
if item.contentChannel != 'videolibrary': videolibrary(itemlist, item, function_level=3)
|
if item.contentChannel != 'videolibrary': videolibrary(itemlist, item, function_level=3)
|
||||||
@@ -999,7 +1000,7 @@ def controls(itemlist, item, AutoPlay=True, CheckLinks=True, down_load=True):
|
|||||||
|
|
||||||
VL = False
|
VL = False
|
||||||
try:
|
try:
|
||||||
if inspect.stack()[3][3] in ['download_from_best_server', 'select_server'] or \
|
if 'downloads' in inspect.stack()[3][1] + inspect.stack()[4][1] or \
|
||||||
inspect.stack()[4][3] == 'play_from_library' or \
|
inspect.stack()[4][3] == 'play_from_library' or \
|
||||||
inspect.stack()[5][3] == 'play_from_library' or \
|
inspect.stack()[5][3] == 'play_from_library' or \
|
||||||
'videolibrary' in inspect.stack()[3][1] or \
|
'videolibrary' in inspect.stack()[3][1] or \
|
||||||
@@ -1007,7 +1008,7 @@ def controls(itemlist, item, AutoPlay=True, CheckLinks=True, down_load=True):
|
|||||||
VL = True
|
VL = True
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
if not AP or VL:
|
if not AP or VL or not APS:
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
def filterLang(item, itemlist):
|
def filterLang(item, itemlist):
|
||||||
|
|||||||
@@ -463,7 +463,7 @@ def play_from_library(item):
|
|||||||
|
|
||||||
window_type = config.get_setting("window_type", "videolibrary")
|
window_type = config.get_setting("window_type", "videolibrary")
|
||||||
|
|
||||||
if autoplay.is_active(item.contentChannel):
|
if autoplay.is_active(item.contentChannel) and config.get_setting('autoplay_server_list'):
|
||||||
itemlist = videolibrary.findvideos(item)
|
itemlist = videolibrary.findvideos(item)
|
||||||
|
|
||||||
# y volvemos a lanzar kodi
|
# y volvemos a lanzar kodi
|
||||||
|
|||||||
@@ -5701,6 +5701,10 @@ msgctxt "#70745"
|
|||||||
msgid "Enter another year..."
|
msgid "Enter another year..."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "#70746"
|
||||||
|
msgid "Hide server selection from Autoplay"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
# DNS start [ settings and declaration ]
|
# DNS start [ settings and declaration ]
|
||||||
msgctxt "#707401"
|
msgctxt "#707401"
|
||||||
msgid "Enable DNS Check Alert"
|
msgid "Enable DNS Check Alert"
|
||||||
|
|||||||
@@ -5705,6 +5705,10 @@ msgctxt "#70745"
|
|||||||
msgid "Enter another year..."
|
msgid "Enter another year..."
|
||||||
msgstr "Inserisci un altro anno..."
|
msgstr "Inserisci un altro anno..."
|
||||||
|
|
||||||
|
msgctxt "#70746"
|
||||||
|
msgid "Hide server selection from Autoplay"
|
||||||
|
msgstr "Nascondi la selezione del server da Autoplay"
|
||||||
|
|
||||||
# DNS start [ settings and declaration ]
|
# DNS start [ settings and declaration ]
|
||||||
msgctxt "#707401"
|
msgctxt "#707401"
|
||||||
msgid "Enable DNS Check Alert"
|
msgid "Enable DNS Check Alert"
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
<setting id="player_mode" type="enum" values="Direct|SetResolvedUrl|Built-In|Download and Play" label="30044" default="1"/>
|
<setting id="player_mode" type="enum" values="Direct|SetResolvedUrl|Built-In|Download and Play" label="30044" default="1"/>
|
||||||
<setting id="default_action" type="enum" lvalues="30006|30007|30008" label="30005" default="0"/>
|
<setting id="default_action" type="enum" lvalues="30006|30007|30008" label="30005" default="0"/>
|
||||||
<setting id="autoplay" type="bool" label="70562" default="false" visible="true"/>
|
<setting id="autoplay" type="bool" label="70562" default="false" visible="true"/>
|
||||||
|
<setting id="autoplay_server_list" type="bool" label="70746" default="false" visible="true"/>
|
||||||
<setting id="checklinks" type="bool" label="30020" default="false"/>
|
<setting id="checklinks" type="bool" label="30020" default="false"/>
|
||||||
<setting id="checklinks_number" type="enum" values="5|10|15|20" label="30021" default="0" visible="eq(-1,true)"/>
|
<setting id="checklinks_number" type="enum" values="5|10|15|20" label="30021" default="0" visible="eq(-1,true)"/>
|
||||||
<setting id="thumbnail_type" type="enum" lvalues="30011|30012|30200" label="30010" default="2"/>
|
<setting id="thumbnail_type" type="enum" lvalues="30011|30012|30200" label="30010" default="2"/>
|
||||||
|
|||||||
+34
-25
@@ -240,8 +240,35 @@ def show_menu(item):
|
|||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def filter_thread(filter,item):
|
||||||
|
itemlist = []
|
||||||
|
thumbnail = ''
|
||||||
|
plot = ''
|
||||||
|
dict_ = {'url': 'search/person', 'language': lang, 'query': filter, 'page': 1}
|
||||||
|
tmdb_inf = tmdb.discovery(item, dict_=dict_)
|
||||||
|
results = tmdb_inf.results[0]
|
||||||
|
id = results['id']
|
||||||
|
if id:
|
||||||
|
thumbnail = 'http://image.tmdb.org/t/p/original' + results['profile_path'] if results['profile_path'] else item.thumbnail
|
||||||
|
json_file = httptools.downloadpage('http://api.themoviedb.org/3/person/'+ str(id) + '?api_key=' + tmdb_api + '&language=en', use_requests=True).data
|
||||||
|
plot += jsontools.load(json_file)['biography']
|
||||||
|
|
||||||
|
item = Item(channel=item.channel,
|
||||||
|
title=typo(filter, 'bold'),
|
||||||
|
url=item.url,
|
||||||
|
media_type=item.media_type,
|
||||||
|
action='list_filtered',
|
||||||
|
thumbnail=thumbnail,
|
||||||
|
plot=plot,
|
||||||
|
path=item.path,
|
||||||
|
filterkey=item.filterkey,
|
||||||
|
filter=filter)
|
||||||
|
return item
|
||||||
|
|
||||||
|
|
||||||
def submenu(item):
|
def submenu(item):
|
||||||
support.log()
|
support.log()
|
||||||
|
from lib.concurrent import futures
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
filter_list = []
|
filter_list = []
|
||||||
@@ -262,33 +289,15 @@ def submenu(item):
|
|||||||
for f in media[item.filterkey]:
|
for f in media[item.filterkey]:
|
||||||
if f not in filter_list:
|
if f not in filter_list:
|
||||||
filter_list.append(f)
|
filter_list.append(f)
|
||||||
|
|
||||||
filter_list.sort()
|
filter_list.sort()
|
||||||
support.log(filter_list)
|
|
||||||
|
|
||||||
for filter in filter_list:
|
with futures.ThreadPoolExecutor() as executor:
|
||||||
thumbnail = ''
|
List = [executor.submit(filter_thread, filter, item) for filter in filter_list]
|
||||||
plot = ''
|
for res in futures.as_completed(List):
|
||||||
if item.filterkey in ['director','actors']:
|
if res.result():
|
||||||
tmdb.set_infoLabels(itemlist, seekTmdb=True)
|
itemlist.append(res.result())
|
||||||
load_info = load_json('http://api.themoviedb.org/3/search/person/?api_key=' + tmdb_api + '&language=' + lang + '&query=' + filter)
|
itemlist = sorted(itemlist, key=lambda it: it.title)
|
||||||
id = str(load_info['results'][0]['id']) if load_info.has_key('results') else ''
|
|
||||||
if id:
|
|
||||||
info = load_json('http://api.themoviedb.org/3/person/'+ id + '?api_key=' + tmdb_api + '&language=' + lang) if id else ''
|
|
||||||
if info.has_key('biography') and not info['biography']:
|
|
||||||
bio = load_json('http://api.themoviedb.org/3/person/'+ id + '?api_key=' + tmdb_api + '&language=en')['biography']
|
|
||||||
thumbnail = 'https://image.tmdb.org/t/p/w600_and_h900_bestv2' + info['profile_path'] if info['profile_path'] else item.thumbnail
|
|
||||||
plot += info['biography'] if info['biography'] else bio if bio else ''
|
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel,
|
|
||||||
title=typo(filter, 'bold'),
|
|
||||||
url=item.url,
|
|
||||||
media_type=item.media_type,
|
|
||||||
action='list_filtered',
|
|
||||||
thumbnail=thumbnail,
|
|
||||||
plot=plot,
|
|
||||||
path=item.path,
|
|
||||||
filterkey=item.filterkey,
|
|
||||||
filter=filter))
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user