Merge branch 'master' of https://github.com/kodiondemand/addon
This commit is contained in:
@@ -432,7 +432,7 @@ def get_season_and_episode(title):
|
||||
"""
|
||||
filename = ""
|
||||
|
||||
patrons = ["(\d+)\s*[x-]\s*(\d+)", "(\d+)\s*×\s*(\d+)", "(?:[Ss]|[Tt])(\d+)(?:[Ee]|Ep\.)(\d+)",
|
||||
patrons = ["(\d+)\s*[x-]\s*(\d+)", "(\d+)\s*×\s*(\d+)", "(?:[Ss]|[Tt])(\d+)\s?(?:[Ee]|Ep\.?)(\d+)",
|
||||
"(?:[Ss]tag|[Ss]eason|[Ss]tagione\w*)\s*(\d+)\s*(?:[Ee]pi|[Ee]pisode|[Ee]pisodio\w*)\s*(\d+)"]
|
||||
|
||||
for patron in patrons:
|
||||
|
||||
@@ -116,15 +116,15 @@ def dialog_browse(_type, heading, default=""):
|
||||
|
||||
|
||||
def itemlist_refresh():
|
||||
pos = Item().fromurl(xbmc.getInfoLabel('ListItem.FileNameAndPath')).itemlistPosition
|
||||
logger.info('Current position: ' + str(pos))
|
||||
# pos = Item().fromurl(xbmc.getInfoLabel('ListItem.FileNameAndPath')).itemlistPosition
|
||||
# logger.info('Current position: ' + str(pos))
|
||||
xbmc.executebuiltin("Container.Refresh")
|
||||
|
||||
while Item().fromurl(xbmc.getInfoLabel('ListItem.FileNameAndPath')).itemlistPosition != pos:
|
||||
win = xbmcgui.Window(xbmcgui.getCurrentWindowId())
|
||||
cid = win.getFocusId()
|
||||
ctl = win.getControl(cid)
|
||||
ctl.selectItem(pos)
|
||||
# while Item().fromurl(xbmc.getInfoLabel('ListItem.FileNameAndPath')).itemlistPosition != pos:
|
||||
# win = xbmcgui.Window(xbmcgui.getCurrentWindowId())
|
||||
# cid = win.getFocusId()
|
||||
# ctl = win.getControl(cid)
|
||||
# ctl.selectItem(pos)
|
||||
|
||||
|
||||
def itemlist_update(item, replace=False):
|
||||
@@ -162,7 +162,7 @@ def render_items(itemlist, parent_item):
|
||||
|
||||
dirItems = []
|
||||
for n, item in enumerate(itemlist):
|
||||
item.itemlistPosition = n + 1
|
||||
# item.itemlistPosition = n + 1
|
||||
item_url = item.tourl()
|
||||
|
||||
if item.category == "":
|
||||
|
||||
@@ -9,7 +9,7 @@ from core.item import Item
|
||||
from platformcode import logger
|
||||
|
||||
host = "http://epg-guide.com/kltv.gz"
|
||||
blacklisted_genres = ['attualita', 'scienza', 'religione', 'cucina', 'notiziario', 'altro', 'soap opera', 'viaggi', 'economia', 'tecnologia', 'magazine', 'show', 'reality show', 'lifestyle', 'societa', 'wrestling', 'azione', 'Musica', 'real life', 'real adventure', 'dplay original', 'natura', 'news', 'food', 'sport', 'moda', 'arte e cultura', 'crime', 'box set e serie tv', 'casa', 'storia', 'talk show', 'motori', 'attualit\xc3\xa0 e inchiesta', 'documentari', 'musica', 'spettacolo', 'medical', 'talent show', 'sex and love', 'beauty and style', 'news/current affairs', "children's/youth programmes", 'leisure hobbies', 'social/political issues/economics', 'education/science/factual topics', 'undefined content', 'show/game show', 'music/ballet/dance', 'sports', 'arts/culture', 'biografico', 'informazione']
|
||||
blacklisted_genres = ['attualita', 'scienza', 'religione', 'cucina', 'notiziario', 'altro', 'soap opera', 'viaggi', 'economia', 'tecnologia', 'magazine', 'show', 'reality show', 'lifestyle', 'societa', 'wrestling', 'azione', 'Musica', 'real life', 'real adventure', 'dplay original', 'natura', 'news', 'food', 'sport', 'moda', 'arte e cultura', 'crime', 'box set e serie tv', 'casa', 'storia', 'talk show', 'motori', 'attualit\xc3\xa0 e inchiesta', 'documentari', 'musica', 'spettacolo', 'medical', 'talent show', 'sex and love', 'beauty and style', 'news/current affairs', "children's/youth programmes", 'leisure hobbies', 'social/political issues/economics', 'education/science/factual topics', 'undefined content', 'show/game show', 'music/ballet/dance', 'sports', 'arts/culture', 'biografico', 'informazione', 'documentario']
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
@@ -69,6 +69,7 @@ def peliculas(item, f=None, ):
|
||||
director = ''
|
||||
year = ''
|
||||
genres = []
|
||||
genre = ''
|
||||
country = ''
|
||||
skip = False
|
||||
|
||||
@@ -80,7 +81,7 @@ def peliculas(item, f=None, ):
|
||||
channel = scrapertools.find_single_match(line, r'channel="([^"]+)"')
|
||||
elif '<title' in line:
|
||||
title = scrapertools.find_single_match(line, r'>([^<]+?)(?: - (?:1\s*\^\s*TV|Prima\s*T[Vv]))?<')
|
||||
if not title or title in titles:
|
||||
if not title or title in titles or title == 'EPG non disponibile':
|
||||
skip = True
|
||||
elif not skip and '<desc' in line:
|
||||
genre, episode, plot = scrapertools.find_single_match(line, r'>(?:\[([^\]]+)\])?(S[0-9]+\s*Ep?[0-9]+)?(?:\s*-\s*)?([^<]+)')
|
||||
@@ -111,13 +112,20 @@ def peliculas(item, f=None, ):
|
||||
elif genre: genres = genre.split('/')
|
||||
if not skip:
|
||||
titles.append(title)
|
||||
if (item.contentType == 'movie' and genres and (item.category in genres or item.all==True)) or (item.contentType == 'tvshow' and episode):
|
||||
if (item.contentType == 'movie' and genres and (item.category in genres or item.all == True)) or (item.contentType == 'tvshow' and episode):
|
||||
if episode:
|
||||
episode = scrapertools.get_season_and_episode(episode)
|
||||
se, ep = episode.split('x')
|
||||
else:
|
||||
se, ep = ('', '')
|
||||
itemlist.append(Item(
|
||||
channel=item.channel,
|
||||
action='new_search',
|
||||
title=support.typo(title + (' - ' + episode if episode else ''), 'bold'),
|
||||
contentTitle=title if item.contentType == 'movie' else '',
|
||||
contentSerieName=title if item.contentType == 'tvshow' else '',
|
||||
contentSeason=se,
|
||||
contentEpisodeNumber=ep,
|
||||
fulltitle=title,
|
||||
search_text=title,
|
||||
mode=item.contentType,
|
||||
@@ -129,7 +137,9 @@ def peliculas(item, f=None, ):
|
||||
'director': director,
|
||||
'genre': genres,
|
||||
'country': country,
|
||||
'year': year
|
||||
'year': year,
|
||||
'season': se,
|
||||
'episode': ep
|
||||
}
|
||||
))
|
||||
|
||||
@@ -142,6 +152,7 @@ def peliculas(item, f=None, ):
|
||||
director = ''
|
||||
year = ''
|
||||
genres = []
|
||||
genre = ''
|
||||
country = ''
|
||||
skip = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user