Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -70,7 +70,7 @@ def peliculas(item):
|
||||
action = 'check'
|
||||
patron = r'src="(?P<poster>http[^"]+)(?:[^>]+>){4}\s*<a href="(?P<url>[^"]+)[^>]+>\s*(?P<title>[^\[\(\<]+)(?:\[(?P<quality>[^\]]+)\])?\s*(?:\((?P<lang>[a-zA-z-]+)\))?\s*(?:\((?P<year>\d+)\))?\s*</a>\s*</h2>'
|
||||
if item.args == 'search':
|
||||
patron = '<title>(?P<title>[^\[\(\<]+)(?:\[(?P<quality>[^\]]+)\])?\s*(?:\((?P<lang>[a-zA-z-]+)\))?[^>]+>\s*<link>(?P<url>[^<]+)'
|
||||
patron = r'<title>(?P<title>[^\[\(\<]+)(?:\[(?P<quality>[^\]]+)\])?\s*(?:\((?P<lang>[a-zA-z-]+)\))?\s*(?:\((?P<year>\d+)\))?\s*[^>]+>\s*<link>(?P<url>[^<]+)'
|
||||
patronNext = r'href="([^"]+)[^>]+>Successivo'
|
||||
return locals()
|
||||
|
||||
|
||||
@@ -64,9 +64,11 @@ def newest(categoria):
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
# debug=True
|
||||
if item.args == 'last':
|
||||
patronBlock = r'inseriti:(?P<block>.*?)<div class="block-showmore'
|
||||
patron = r'item-movie">[^>]+><a href="(?P<url>[^"]+)[^>]+><img data-src="(?P<thumb>[^"]+)(?:[^>]+>){6}(?P<title>[^<]+)(?:[^>]+>){6}(?P<quality>[^<]+)'
|
||||
patron = r'item-movie">[^>]+><a href="(?P<url>[^"]+)[^>]+><img data-src="(?P<thumb>[^"]+)(?:[^>]+>){6}(?P<title>[^<]+)(?:[^>]+>){4}(?P<year>\d+)?(?:[^>]+>){2}(?P<quality>[^<]+)'
|
||||
# patron = r'item-movie">[^>]+><a href="(?P<url>[^"]+)[^>]+><img data-src="(?P<thumb>[^"]+)(?:[^>]+>){6}(?P<title>[^<]+)(?:[^>]+>){6}(?P<quality>[^<]+)'
|
||||
patronNext = r'<a href="([^"]+)">&rarr'
|
||||
return locals()
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
from platformcode import config, logger
|
||||
import xbmc, sys, xbmcgui, os
|
||||
|
||||
|
||||
librerias = xbmc.translatePath(os.path.join(config.get_runtime_path(), 'lib'))
|
||||
sys.path.insert(0, librerias)
|
||||
|
||||
from core import jsontools, support
|
||||
from core.item import Item
|
||||
|
||||
addon_id = config.get_addon_core().getAddonInfo('id')
|
||||
|
||||
@@ -41,15 +43,6 @@ def build_menu():
|
||||
contextmenuitems.extend([item for item, fn in module_item_actions])
|
||||
contextmenuactions.extend([fn for item, fn in module_item_actions])
|
||||
|
||||
if 'kod' in filePath and mediatype in ['movie', 'episode'] and config.get_setting('autoplay'):
|
||||
logger.debug('Add Select server menu item')
|
||||
contextmenuitems.append(config.get_localized_string(70192))
|
||||
from core import filetools
|
||||
from core.item import Item
|
||||
item = Item().fromurl(filetools.read(filePath))
|
||||
item.disableAutoplay = True
|
||||
contextmenuactions.append(item)
|
||||
|
||||
if len(contextmenuitems) == 0:
|
||||
logger.debug('No contextmodule found, build an empty one')
|
||||
contextmenuitems.append(empty_item())
|
||||
@@ -59,10 +52,6 @@ def build_menu():
|
||||
|
||||
if ret > -1:
|
||||
logger.debug('Contextmenu module index', ret, ', label=' + contextmenuitems[ret])
|
||||
if isinstance(contextmenuactions[ret], Item):
|
||||
from platformcode.launcher import run
|
||||
run(contextmenuactions[ret])
|
||||
else:
|
||||
contextmenuactions[ret]()
|
||||
|
||||
|
||||
|
||||
@@ -1033,6 +1033,12 @@ class Tmdb(object):
|
||||
if len(results) > 1:
|
||||
from lib.fuzzy_match import algorithims
|
||||
if self.search_type == 'multi':
|
||||
if self.search_year:
|
||||
for r in results:
|
||||
if (r.get('release_date', '') and r.get('release_date', '')[:4] == self.search_year) or (r.get('first_air_date', '') and r.get('first_air_date', '')[:4] == self.search_year):
|
||||
results = [r]
|
||||
break
|
||||
if len(results) > 1:
|
||||
results.sort(key=lambda r: algorithims.trigram(text_simple, r.get('name', '') if r.get('media_type') == 'tv' else r.get('title', '')), reverse=True)
|
||||
else:
|
||||
results.sort(key=lambda r: algorithims.trigram(text_simple, r.get('name', '') if self.search_type == 'tv' else r.get('title', '')), reverse=True)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[
|
||||
"platformcode.contextmenu.search",
|
||||
"platformcode.contextmenu.tvshow_options",
|
||||
"platformcode.contextmenu.trailer"
|
||||
"platformcode.contextmenu.trailer",
|
||||
"platformcode.contextmenu.show_servers"
|
||||
]
|
||||
23
platformcode/contextmenu/show_servers.py
Normal file
23
platformcode/contextmenu/show_servers.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import xbmc
|
||||
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
|
||||
|
||||
def get_menu_items():
|
||||
mediatype = xbmc.getInfoLabel('ListItem.DBTYPE')
|
||||
filePath = xbmc.getInfoLabel('ListItem.FileNameAndPath')
|
||||
res = []
|
||||
if 'kod' in filePath and mediatype in ['movie', 'episode'] and config.get_setting('autoplay'):
|
||||
res = [(config.get_localized_string(70192), execute)]
|
||||
return res
|
||||
|
||||
|
||||
def execute():
|
||||
from core import filetools
|
||||
from platformcode.launcher import run
|
||||
filePath = xbmc.getInfoLabel('ListItem.FileNameAndPath')
|
||||
item = Item().fromurl(filetools.read(filePath))
|
||||
item.disableAutoplay = True
|
||||
|
||||
run(item)
|
||||
@@ -37,7 +37,7 @@
|
||||
"type": "list",
|
||||
"label": "@60613",
|
||||
"default": 1,
|
||||
"enabled": "eq(-2,@60604)|eq(-2,@60605)|eq(-1,@60607)",
|
||||
"enabled": "eq(-2,@60604)|eq(-2,@60605)|eq(-2,@60608)",
|
||||
"lvalues": [
|
||||
"00:00",
|
||||
"04:00",
|
||||
|
||||
Reference in New Issue
Block a user