piccoli fix

This commit is contained in:
Alhaziel01
2020-11-25 10:07:54 +01:00
parent 96066d0ec2
commit ee79bf219d
5 changed files with 20 additions and 14 deletions

View File

@@ -64,8 +64,7 @@ def peliculas(item):
else:
patron = r'<a href="(?P<url>[^"]+)"\s*title="(?P<title>[^"\(]+)(?:"|\()(?:(?P<year>\d+)[^"]+)?.*?url\((?P<thumb>[^\)]+)\)(?:.*?<div class="voto">[^>]+>[^>]+>\s*(?P<rating>[^<]+))?.*?<div class="titolo">[^>]+>(?:<div class="genere">[^ ]*(?:\s\d+)?\s*(?:\()?(?P<lang>[^\)< ]+))?'
else:
#search
patron = r'<div class="col-lg-3">[^>]+>[^>]+>\s<a href="(?P<url>[^"]+)".+?url\((?P<thumb>[^\)]+)\)">[^>]+>[^>]+>[^>]+>(?:[^>]+>)?\s?(?P<rating>[\d\.]+)?[^>]+>(?P<title>.+?)(?:[ ]\((?P<year>\d{4})\))?<[^>]+>[^>]+>(.?[\d\-x]+\s\(?(?P<lang>[sSuUbBiItTaA\-]+)?\)?\s?(?P<quality>[\w]+)?[|]?\s?(?:[fFiInNeE]+)?\s?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?)?'
patron = r'<div class="col-lg-3">[^>]+>[^>]+>\s*<a href="(?P<url>[^"]+)".+?url\((?P<thumb>[^\)]+)\)">[^>]+>[^>]+>[^>]+>(?:[^>]+>)?\s?(?P<rating>[\d\.]+)?[^>]+>(?P<title>.+?)(?:[ ]\((?P<year>\d{4})\))?<[^>]+>[^>]+>(.?[\d\-x]+\s\(?(?P<lang>[sSuUbBiItTaA\-]+)?\)?\s?(?P<quality>[\w]+)?[|]?\s?(?:[fFiInNeE]+)?\s?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?)?'
def itemHook(item):
if 'sub' in item.contentLanguage.lower() and not 'ita' in item.contentLanguage.lower():

View File

@@ -507,7 +507,7 @@ def scrape(func):
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
if not group and not args.get('groupExplode') and ((pagination and len(matches) <= pag * pagination) or not pagination): # next page with pagination
if patronNext and inspect.stack()[1][3] not in ['newest']:
if patronNext and inspect.stack()[1][3] not in ['newest'] and inspect.stack()[2][3] not in ['get_channel_results']:
nextPage(itemlist, item, data, patronNext, function)
# if function == 'episodios':

View File

@@ -192,7 +192,7 @@ class SearchWindow(xbmcgui.WindowXML):
n = list_cat.index('anime')
list_cat[n] = 'tvshow'
if self.item.type in list_cat:
if self.item.mode == 'all' or self.item.type in list_cat:
if config.get_setting("include_in_global_search", channel) and ch_param.get("active", False):
channels_list.append(channel)
@@ -205,8 +205,7 @@ class SearchWindow(xbmcgui.WindowXML):
try:
module = __import__('channels.%s' % channel, fromlist=["channels.%s" % channel])
mainlist = getattr(module, 'mainlist')(Item(channel=channel, global_search=True))
logger.info('TYPE= ', self.item.type)
action = [elem for elem in mainlist if elem.action == "search" and (self.item.mode == 'all' or elem.contentType in [self.item.type, 'undefined'])]
action = [elem for elem in mainlist if elem.action == "search" and (self.item.mode == 'all' or elem.contentType in [self.item.mode, 'undefined'])]
return module, action
except:
import traceback
@@ -410,7 +409,7 @@ class SearchWindow(xbmcgui.WindowXML):
pos = self.RESULTS.getSelectedPosition()
self.CHANNELS.getSelectedItem().setProperty('position', str(pos))
elif action in [BACKSPACE]:
if action in [BACKSPACE]:
self.Back()
elif action in [EXIT]:
@@ -465,11 +464,11 @@ class SearchWindow(xbmcgui.WindowXML):
else:
self.pos = self.EPISODESLIST.getSelectedPosition()
item = self.episodes[self.pos]
# dbg()
self.channel = __import__('channels.%s' % item.channel, fromlist=["channels.%s" % item.channel])
self.itemsResult = getattr(self.channel, item.action)(item)
if item.action in ['findvideos']:
if self.itemsResult and self.itemsResult[0].action in ['play']:
if config.get_setting('checklinks') and not config.get_setting('autoplay'):
self.itemsResult = servertools.check_list_links(self.itemsResult, config.get_setting('checklinks_number'))

View File

@@ -1435,7 +1435,7 @@ class TitleOrIDWindow(xbmcgui.WindowXMLDialog):
self.HEADER.setText(config.get_localized_string(60228) % self.title)
self.TITLE.setLabel('[UPPERCASE]' + config.get_localized_string(60230).replace(':','') + '[/UPPERCASE]')
self.ID.setLabel('[UPPERCASE]' + self.scraper + 'id [/UPPERCASE]')
self.ID.setLabel('[UPPERCASE]' + self.idtitle + '[/UPPERCASE]')
self.setFocusId(101)
def onClick(self, control):

View File

@@ -42,7 +42,7 @@
</control>
<control type="textbox">
<description>Modify</description>
<top>40</top>
<top>20</top>
<left>40</left>
<height>40</height>
<width>100</width>
@@ -53,10 +53,18 @@
<align>left</align>
<label/>
</control>
<control type="image">
<description>Separator</description>
<top>80</top>
<left>0</left>
<height>1</height>
<width>480</width>
<texture colordiffuse="FFFFFFFF">white.png</texture>
</control>
<control type="button" id="103">
<description>CLOSE</description>
<top>40</top>
<right>40</right>
<top>20</top>
<right>20</right>
<height>40</height>
<width>40</width>
<texturefocus colordiffuse="FFFFFFFF">close.png</texturefocus>
@@ -64,7 +72,7 @@
<ondown>101</ondown>
</control>
<control type="grouplist">
<bottom>40</bottom>
<top>120</top>
<left>40</left>
<height>40</height>
<width>400</width>