"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
|
from core.item import Item
|
||||||
|
|
||||||
if dict_:
|
if dict_:
|
||||||
|
if item.page:
|
||||||
|
item.discovery['page'] = item.page
|
||||||
listado = Tmdb(discover = dict_, cast=cast)
|
listado = Tmdb(discover = dict_, cast=cast)
|
||||||
|
|
||||||
elif item.search_type == 'discover':
|
elif item.search_type == 'discover':
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
# XBMC Launcher (xbmc / kodi)
|
# XBMC Launcher (xbmc / kodi)
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
import sys, os
|
import sys, os
|
||||||
PY3 = False
|
PY3 = False
|
||||||
if sys.version_info[0] >= 3:PY3 = True; unicode = str; unichr = chr; long = int
|
if sys.version_info[0] >= 3:PY3 = True; unicode = str; unichr = chr; long = int
|
||||||
@@ -151,6 +150,17 @@ def run(item=None):
|
|||||||
import urllib
|
import urllib
|
||||||
short = urllib.urlopen('https://u.nu/api.php?action=shorturl&format=simple&url=' + item.url).read().decode('utf-8')
|
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)
|
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:
|
else:
|
||||||
# Checks if channel exists
|
# Checks if channel exists
|
||||||
if os.path.isfile(os.path.join(config.get_runtime_path(), 'channels', item.channel + ".py")):
|
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:
|
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}))))
|
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():
|
if config.dev_mode():
|
||||||
context_commands.insert(0, ("item info", "Container.Update (%s?%s)" % (sys.argv[0], Item(action="itemInfo", parent=item.tojson()).tourl())))
|
context_commands.insert(0, ("item info", "Container.Update (%s?%s)" % (sys.argv[0], Item(action="itemInfo", parent=item.tojson()).tourl())))
|
||||||
return context_commands
|
return context_commands
|
||||||
|
|||||||
@@ -4845,7 +4845,7 @@ msgid "Manual Search"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#70511"
|
msgctxt "#70511"
|
||||||
msgid ""
|
msgid "Goto page"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#70512"
|
msgctxt "#70512"
|
||||||
@@ -4853,7 +4853,7 @@ msgid "Searching in Mymovies"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#70513"
|
msgctxt "#70513"
|
||||||
msgid ""
|
msgid "Insert page number"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgctxt "#70514"
|
msgctxt "#70514"
|
||||||
|
|||||||
@@ -4844,16 +4844,16 @@ msgid "Manual Search"
|
|||||||
msgstr "Ricerca Manuale"
|
msgstr "Ricerca Manuale"
|
||||||
|
|
||||||
msgctxt "#70511"
|
msgctxt "#70511"
|
||||||
msgid ""
|
msgid "Goto page"
|
||||||
msgstr ""
|
msgstr "Vai a pagina"
|
||||||
|
|
||||||
msgctxt "#70512"
|
msgctxt "#70512"
|
||||||
msgid "Searching in Mymovies"
|
msgid "Searching in Mymovies"
|
||||||
msgstr "Ricerca in Mymovies"
|
msgstr "Ricerca in Mymovies"
|
||||||
|
|
||||||
msgctxt "#70513"
|
msgctxt "#70513"
|
||||||
msgid ""
|
msgid "Insert page number"
|
||||||
msgstr ""
|
msgstr "Inserisci numero di pagina"
|
||||||
|
|
||||||
msgctxt "#70514"
|
msgctxt "#70514"
|
||||||
msgid ""
|
msgid ""
|
||||||
|
|||||||
+7
-5
@@ -722,12 +722,14 @@ def discover_list(item):
|
|||||||
|
|
||||||
elif len(result) > 19 and item.discovery:
|
elif len(result) > 19 and item.discovery:
|
||||||
item.discovery['page'] = str(int(item.discovery['page']) + 1)
|
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'),
|
itemlist.append(Item(channel=item.channel, action='discover_list', nextPage=True,
|
||||||
list_type=item.list_type, discovery=item.discovery, thumbnail=thumb()))
|
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:
|
elif len(result) > 19:
|
||||||
next_page = str(int(item.page) + 1)
|
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()))
|
list_type=item.list_type, search_type=item.search_type, mode=item.mode, page=next_page, thumbnail=thumb()))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
@@ -789,8 +791,8 @@ def get_from_temp(item):
|
|||||||
results = [Item().fromurl(elem) for elem in item.itemlist[prevp:nextp]]
|
results = [Item().fromurl(elem) for elem in item.itemlist[prevp:nextp]]
|
||||||
|
|
||||||
if nextp < nTotal:
|
if nextp < nTotal:
|
||||||
results.append(Item(channel='search', title=typo(config.get_localized_string(30992),'bold color kod'),
|
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)
|
tmdb.set_infoLabels_itemlist(results, True)
|
||||||
for elem in results:
|
for elem in results:
|
||||||
|
|||||||
Reference in New Issue
Block a user