"Vai a pagina" nel menu contestuale
This commit is contained in:
@@ -622,6 +622,8 @@ def discovery(item, dict_=False, cast=False):
|
||||
from core.item import Item
|
||||
|
||||
if dict_:
|
||||
if item.page:
|
||||
item.discovery['page'] = item.page
|
||||
listado = Tmdb(discover = dict_, cast=cast)
|
||||
|
||||
elif item.search_type == 'discover':
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
# ------------------------------------------------------------
|
||||
# XBMC Launcher (xbmc / kodi)
|
||||
# ------------------------------------------------------------
|
||||
|
||||
import sys, os
|
||||
PY3 = False
|
||||
if sys.version_info[0] >= 3:PY3 = True; unicode = str; unichr = chr; long = int
|
||||
@@ -151,6 +150,17 @@ def run(item=None):
|
||||
import urllib
|
||||
short = urllib.urlopen('https://u.nu/api.php?action=shorturl&format=simple&url=' + item.url).read().decode('utf-8')
|
||||
platformtools.dialog_ok(config.get_localized_string(20000), config.get_localized_string(70740) % short)
|
||||
elif item.action == "gotopage":
|
||||
page = platformtools.dialog_numeric(0, config.get_localized_string(70513))
|
||||
if page:
|
||||
import xbmc
|
||||
item.action = item.real_action
|
||||
if item.page:
|
||||
item.page = page
|
||||
else:
|
||||
import re
|
||||
item.url = re.sub('([=/])[0-9]+(/?)$', '\g<1>' + page + '\g<2>', item.url)
|
||||
xbmc.executebuiltin("Container.Update(%s?%s)" % (sys.argv[0], item.tourl()))
|
||||
else:
|
||||
# Checks if channel exists
|
||||
if os.path.isfile(os.path.join(config.get_runtime_path(), 'channels', item.channel + ".py")):
|
||||
|
||||
@@ -648,6 +648,8 @@ def set_context_commands(item, item_url, parent_item, **kwargs):
|
||||
if (item.contentTitle and item.contentType in ['movie', 'tvshow']) or "buscar_trailer" in context:
|
||||
context_commands.append((config.get_localized_string(60359), "RunPlugin(%s?%s&%s)" % (sys.argv[0], item_url, urllib.urlencode({ 'channel': "trailertools", 'action': "buscartrailer", 'search_title': item.contentTitle if item.contentTitle else item.fulltitle, 'contextual': True}))))
|
||||
|
||||
if item.nextPage:
|
||||
context_commands.append((config.get_localized_string(70511), "RunPlugin(%s?%s&%s)" % (sys.argv[0], item_url, 'action=gotopage&real_action='+item.action)))
|
||||
if config.dev_mode():
|
||||
context_commands.insert(0, ("item info", "Container.Update (%s?%s)" % (sys.argv[0], Item(action="itemInfo", parent=item.tojson()).tourl())))
|
||||
return context_commands
|
||||
|
||||
@@ -4845,7 +4845,7 @@ msgid "Manual Search"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#70511"
|
||||
msgid ""
|
||||
msgid "Goto page"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#70512"
|
||||
@@ -4853,7 +4853,7 @@ msgid "Searching in Mymovies"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#70513"
|
||||
msgid ""
|
||||
msgid "Insert page number"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#70514"
|
||||
|
||||
@@ -4844,16 +4844,16 @@ msgid "Manual Search"
|
||||
msgstr "Ricerca Manuale"
|
||||
|
||||
msgctxt "#70511"
|
||||
msgid ""
|
||||
msgstr ""
|
||||
msgid "Goto page"
|
||||
msgstr "Vai a pagina"
|
||||
|
||||
msgctxt "#70512"
|
||||
msgid "Searching in Mymovies"
|
||||
msgstr "Ricerca in Mymovies"
|
||||
|
||||
msgctxt "#70513"
|
||||
msgid ""
|
||||
msgstr ""
|
||||
msgid "Insert page number"
|
||||
msgstr "Inserisci numero di pagina"
|
||||
|
||||
msgctxt "#70514"
|
||||
msgid ""
|
||||
|
||||
@@ -722,12 +722,14 @@ def discover_list(item):
|
||||
|
||||
elif len(result) > 19 and item.discovery:
|
||||
item.discovery['page'] = str(int(item.discovery['page']) + 1)
|
||||
itemlist.append(Item(channel=item.channel, action='discover_list', title=typo(config.get_localized_string(30992), 'color kod bold'),
|
||||
list_type=item.list_type, discovery=item.discovery, thumbnail=thumb()))
|
||||
itemlist.append(Item(channel=item.channel, action='discover_list', nextPage=True,
|
||||
title=typo(config.get_localized_string(30992), 'color kod bold'),
|
||||
list_type=item.list_type, discovery=item.discovery, thumbnail=thumb(), page=item.discovery['page']))
|
||||
elif len(result) > 19:
|
||||
next_page = str(int(item.page) + 1)
|
||||
|
||||
itemlist.append(Item(channel=item.channel, action='discover_list', title=typo(config.get_localized_string(30992), 'color kod bold'),
|
||||
itemlist.append(Item(channel=item.channel, action='discover_list', nextPage=True,
|
||||
title=typo(config.get_localized_string(30992), 'color kod bold'),
|
||||
list_type=item.list_type, search_type=item.search_type, mode=item.mode, page=next_page, thumbnail=thumb()))
|
||||
|
||||
return itemlist
|
||||
@@ -790,7 +792,7 @@ def get_from_temp(item):
|
||||
|
||||
if nextp < nTotal:
|
||||
results.append(Item(channel='search', title=typo(config.get_localized_string(30992), 'bold color kod'),
|
||||
action='get_from_temp', itemlist=item.itemlist, page=item.page + 1))
|
||||
action='get_from_temp', itemlist=item.itemlist, page=item.page + 1, nextPage=True))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(results, True)
|
||||
for elem in results:
|
||||
|
||||
Reference in New Issue
Block a user