external
parent
b018d83178
commit
84c42525a0
19
Core.py
19
Core.py
|
@ -1483,25 +1483,25 @@ class Core:
|
||||||
silent = get("silent")
|
silent = get("silent")
|
||||||
thumbnail = unquote(get("thumbnail"),'')
|
thumbnail = unquote(get("thumbnail"),'')
|
||||||
save_folder = unquote(get("save_folder"),'')
|
save_folder = unquote(get("save_folder"),'')
|
||||||
if external:
|
if external and not get('from_searcher'):
|
||||||
try:
|
try:
|
||||||
s = json.loads(json.loads(urllib.unquote_plus(get("sdata"))))
|
#if 1==1:
|
||||||
|
sdata = json.loads(json.loads(urllib.unquote_plus(get("sdata"))))
|
||||||
if len(filesList) < 1:
|
if len(filesList) < 1:
|
||||||
xbmcplugin.endOfDirectory(handle=int(sys.argv[1]), succeeded=True)
|
xbmcplugin.endOfDirectory(handle=int(sys.argv[1]), succeeded=True)
|
||||||
if not silent:
|
if not silent:
|
||||||
xbmc.executebuiltin(
|
xbmc.executebuiltin(
|
||||||
'XBMC.ActivateWindow(%s)' % 'Videos,plugin://plugin.video.myshows/?mode=3013')
|
'XBMC.ActivateWindow(%s)' % 'Videos,plugin://plugin.video.myshows/?mode=3013')
|
||||||
else:
|
else:
|
||||||
xbmc.executebuiltin(
|
showMessage(self.localize('Information'), self.localize('Torrent list is empty.'))
|
||||||
'XBMC.Notification("%s", "%s", %s)' % ("Поиск", "Ничего не найдено :(", "2500"))
|
|
||||||
return
|
return
|
||||||
if silent:
|
if silent:
|
||||||
order, seeds, leechers, size, title, link, image = filesList[0]
|
order, seeds, leechers, size, title, link, image = filesList[0]
|
||||||
xbmc.executebuiltin('XBMC.RunPlugin(%s)' % (
|
xbmc.executebuiltin('XBMC.RunPlugin(%s)' % (
|
||||||
'plugin://plugin.video.myshows/?mode=3010&sort=activate&action=silent&stringdata=' + urllib.quote_plus(
|
'plugin://plugin.video.myshows/?mode=3010&sort=activate&action=silent&stringdata=' + urllib.quote_plus(
|
||||||
'{"filename":"%s", "stype":%s, "showId":%s, "seasonId":%s, "id":%s, "episodeId":%s}' % (
|
'{"filename":"%s", "stype":%s, "showId":%s, "seasonId":%s, "id":%s, "episodeId":%s}' % (
|
||||||
link, jstr(s['stype']), jstr(s['showId']), jstr(s['seasonId']), jstr(s['id']),
|
link, jstr(sdata['stype']), jstr(sdata['showId']), jstr(sdata['seasonId']), jstr(sdata['id']),
|
||||||
jstr(s['episodeId'])))))
|
jstr(sdata['episodeId'])))))
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
for (order, seeds, leechers, size, title, link, image) in filesList:
|
for (order, seeds, leechers, size, title, link, image) in filesList:
|
||||||
|
@ -1515,8 +1515,8 @@ class Core:
|
||||||
'XBMC.RunPlugin(%s)' % (
|
'XBMC.RunPlugin(%s)' % (
|
||||||
'plugin://plugin.video.myshows/?mode=3010&sort=activate&stringdata=' + urllib.quote_plus(
|
'plugin://plugin.video.myshows/?mode=3010&sort=activate&stringdata=' + urllib.quote_plus(
|
||||||
'{"filename":"%s", "stype":%s, "showId":%s, "seasonId":%s, "id":%s, "episodeId":%s}' % (
|
'{"filename":"%s", "stype":%s, "showId":%s, "seasonId":%s, "id":%s, "episodeId":%s}' % (
|
||||||
link, jstr(s['stype']), jstr(s['showId']), jstr(s['seasonId']), jstr(s['id']),
|
link, jstr(sdata['stype']), jstr(sdata['showId']), jstr(sdata['seasonId']), jstr(sdata['id']),
|
||||||
jstr(s['episodeId']))))),
|
jstr(sdata['episodeId']))))),
|
||||||
(self.localize('Open (no return)'),
|
(self.localize('Open (no return)'),
|
||||||
'XBMC.ActivateWindow(Videos,%s)' % ('%s?action=%s%s') % (
|
'XBMC.ActivateWindow(Videos,%s)' % ('%s?action=%s%s') % (
|
||||||
sys.argv[0], 'openTorrent', link_url)),
|
sys.argv[0], 'openTorrent', link_url)),
|
||||||
|
@ -1526,8 +1526,9 @@ class Core:
|
||||||
title = self.titleMake(seeds, leechers, size, title)
|
title = self.titleMake(seeds, leechers, size, title)
|
||||||
self.drawItem(title, 'context', link, image, contextMenu=contextMenu)
|
self.drawItem(title, 'context', link, image, contextMenu=contextMenu)
|
||||||
except:
|
except:
|
||||||
|
#else:
|
||||||
showMessage(self.localize('Information'), self.localize('Torrent list is empty.'))
|
showMessage(self.localize('Information'), self.localize('Torrent list is empty.'))
|
||||||
xbmc.executebuiltin('XBMC.RunPlugin(%s)' % 'plugin://plugin.video.myshows/?mode=3013')
|
if get("sdata"): xbmc.executebuiltin('XBMC.RunPlugin(%s)' % 'plugin://plugin.video.myshows/?mode=3013')
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
for (order, seeds, leechers, size, title, link, image) in filesList:
|
for (order, seeds, leechers, size, title, link, image) in filesList:
|
||||||
|
|
Loading…
Reference in New Issue