Merge remote-tracking branch 'origin/master' into master
This commit is contained in:
@@ -281,5 +281,6 @@ def play_multi_channel(item, itemlist):
|
||||
def servername(server):
|
||||
from core.servertools import translate_server_name
|
||||
path = filetools.join(config.get_runtime_path(), 'servers', server.lower() + '.json')
|
||||
name = jsontools.load(open(path, "r").read())['name'].upper()
|
||||
name = jsontools.load(open(path, "r").read())['name']
|
||||
if name.startswith('@'): name = config.get_localized_string(int(name.replace('@','')))
|
||||
return translate_server_name(name)
|
||||
@@ -8,7 +8,7 @@ PY3 = False
|
||||
if sys.version_info[0] >= 3:PY3 = True; unicode = str; unichr = chr; long = int
|
||||
|
||||
from core.item import Item
|
||||
from core import filetools
|
||||
from core import filetools, jsontools
|
||||
from platformcode import config, logger, platformtools
|
||||
from platformcode.logger import WebErrorException
|
||||
temp_search_file = config.get_temp_file('temp-search')
|
||||
@@ -484,8 +484,8 @@ def play_from_library(item):
|
||||
item.play_from = 'window'
|
||||
itemlist = videolibrary.findvideos(item)
|
||||
p_dialog.update(100, ''); sleep(0.5); p_dialog.close()
|
||||
while platformtools.is_playing(): # Conventional window
|
||||
sleep(1)
|
||||
# while platformtools.is_playing(): # Conventional window
|
||||
# sleep(100)
|
||||
play_time = platformtools.resume_playback(item, True)
|
||||
if not play_time and config.get_setting('autoplay'):
|
||||
return
|
||||
@@ -504,7 +504,10 @@ def play_from_library(item):
|
||||
item.thumbnail = config.get_online_server_thumb(item.server)
|
||||
quality = '[B][' + item.quality + '][/B]' if item.quality else ''
|
||||
if item.server:
|
||||
it = xbmcgui.ListItem('\n[B]%s[/B] %s - %s' % (item.server, quality, item.contentTitle))
|
||||
path = filetools.join(config.get_runtime_path(), 'servers', item.server.lower() + '.json')
|
||||
name = jsontools.load(open(path, "r").read())['name']
|
||||
if name.startswith('@'): name = config.get_localized_string(int(name.replace('@','')))
|
||||
it = xbmcgui.ListItem('\n[B]%s[/B] %s - %s' % (name, quality, item.contentTitle))
|
||||
it.setArt({'thumb':item.thumbnail})
|
||||
options.append(it)
|
||||
else:
|
||||
|
||||
@@ -90,6 +90,8 @@ def show_menu(item):
|
||||
json = load_json(item)
|
||||
if 'disable_pagination' in json:
|
||||
item.disable_pagination = True
|
||||
if 'sort' in json and json['sort']:
|
||||
item.sort = True
|
||||
|
||||
for key in json:
|
||||
if key == 'menu':
|
||||
@@ -222,6 +224,8 @@ def peliculas(item, json='', key='', itemlist=[]):
|
||||
tmdb.set_infoLabels(itlist, seekTmdb=True)
|
||||
itemlist += itlist
|
||||
|
||||
if item.sort:
|
||||
itemlist.sort(key=lambda x: x.title, reverse=False)
|
||||
if Pagination and len(itemlist) >= Pagination:
|
||||
if inspect.stack()[1][3] != 'get_newest':
|
||||
item.title = support.typo(config.get_localized_string(30992), 'color kod bold')
|
||||
@@ -784,6 +788,7 @@ def add_channel(item):
|
||||
file_path = xbmcgui.Dialog().browseSingle(1, config.get_localized_string(70680), 'files')
|
||||
try:
|
||||
channel_to_add['path'] = file_path
|
||||
channel_to_add['url'] = file_path
|
||||
json_file = jsontools.load(open(file_path, "r").read())
|
||||
channel_to_add['channel_name'] = json_file['channel_name']
|
||||
except:
|
||||
|
||||
Reference in New Issue
Block a user