piccole migliorie
This commit is contained in:
@@ -432,7 +432,7 @@ def get_season_and_episode(title):
|
|||||||
"""
|
"""
|
||||||
filename = ""
|
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+)"]
|
"(?:[Ss]tag|[Ss]eason|[Ss]tagione\w*)\s*(\d+)\s*(?:[Ee]pi|[Ee]pisode|[Ee]pisodio\w*)\s*(\d+)"]
|
||||||
|
|
||||||
for patron in patrons:
|
for patron in patrons:
|
||||||
|
|||||||
@@ -116,15 +116,15 @@ def dialog_browse(_type, heading, default=""):
|
|||||||
|
|
||||||
|
|
||||||
def itemlist_refresh():
|
def itemlist_refresh():
|
||||||
pos = Item().fromurl(xbmc.getInfoLabel('ListItem.FileNameAndPath')).itemlistPosition
|
# pos = Item().fromurl(xbmc.getInfoLabel('ListItem.FileNameAndPath')).itemlistPosition
|
||||||
logger.info('Current position: ' + str(pos))
|
# logger.info('Current position: ' + str(pos))
|
||||||
xbmc.executebuiltin("Container.Refresh")
|
xbmc.executebuiltin("Container.Refresh")
|
||||||
|
|
||||||
while Item().fromurl(xbmc.getInfoLabel('ListItem.FileNameAndPath')).itemlistPosition != pos:
|
# while Item().fromurl(xbmc.getInfoLabel('ListItem.FileNameAndPath')).itemlistPosition != pos:
|
||||||
win = xbmcgui.Window(xbmcgui.getCurrentWindowId())
|
# win = xbmcgui.Window(xbmcgui.getCurrentWindowId())
|
||||||
cid = win.getFocusId()
|
# cid = win.getFocusId()
|
||||||
ctl = win.getControl(cid)
|
# ctl = win.getControl(cid)
|
||||||
ctl.selectItem(pos)
|
# ctl.selectItem(pos)
|
||||||
|
|
||||||
|
|
||||||
def itemlist_update(item, replace=False):
|
def itemlist_update(item, replace=False):
|
||||||
@@ -162,7 +162,7 @@ def render_items(itemlist, parent_item):
|
|||||||
|
|
||||||
dirItems = []
|
dirItems = []
|
||||||
for n, item in enumerate(itemlist):
|
for n, item in enumerate(itemlist):
|
||||||
item.itemlistPosition = n + 1
|
# item.itemlistPosition = n + 1
|
||||||
item_url = item.tourl()
|
item_url = item.tourl()
|
||||||
|
|
||||||
if item.category == "":
|
if item.category == "":
|
||||||
|
|||||||
+15
-4
@@ -9,7 +9,7 @@ from core.item import Item
|
|||||||
from platformcode import logger
|
from platformcode import logger
|
||||||
|
|
||||||
host = "http://epg-guide.com/kltv.gz"
|
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):
|
def mainlist(item):
|
||||||
@@ -69,6 +69,7 @@ def peliculas(item, f=None, ):
|
|||||||
director = ''
|
director = ''
|
||||||
year = ''
|
year = ''
|
||||||
genres = []
|
genres = []
|
||||||
|
genre = ''
|
||||||
country = ''
|
country = ''
|
||||||
skip = False
|
skip = False
|
||||||
|
|
||||||
@@ -80,7 +81,7 @@ def peliculas(item, f=None, ):
|
|||||||
channel = scrapertools.find_single_match(line, r'channel="([^"]+)"')
|
channel = scrapertools.find_single_match(line, r'channel="([^"]+)"')
|
||||||
elif '<title' in line:
|
elif '<title' in line:
|
||||||
title = scrapertools.find_single_match(line, r'>([^<]+?)(?: - (?:1\s*\^\s*TV|Prima\s*T[Vv]))?<')
|
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
|
skip = True
|
||||||
elif not skip and '<desc' in line:
|
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*)?([^<]+)')
|
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('/')
|
elif genre: genres = genre.split('/')
|
||||||
if not skip:
|
if not skip:
|
||||||
titles.append(title)
|
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(
|
itemlist.append(Item(
|
||||||
channel=item.channel,
|
channel=item.channel,
|
||||||
action='new_search',
|
action='new_search',
|
||||||
title=support.typo(title + (' - ' + episode if episode else ''), 'bold'),
|
title=support.typo(title + (' - ' + episode if episode else ''), 'bold'),
|
||||||
contentTitle=title if item.contentType == 'movie' else '',
|
contentTitle=title if item.contentType == 'movie' else '',
|
||||||
contentSerieName=title if item.contentType == 'tvshow' else '',
|
contentSerieName=title if item.contentType == 'tvshow' else '',
|
||||||
|
contentSeason=se,
|
||||||
|
contentEpisodeNumber=ep,
|
||||||
fulltitle=title,
|
fulltitle=title,
|
||||||
search_text=title,
|
search_text=title,
|
||||||
mode=item.contentType,
|
mode=item.contentType,
|
||||||
@@ -129,7 +137,9 @@ def peliculas(item, f=None, ):
|
|||||||
'director': director,
|
'director': director,
|
||||||
'genre': genres,
|
'genre': genres,
|
||||||
'country': country,
|
'country': country,
|
||||||
'year': year
|
'year': year,
|
||||||
|
'season': se,
|
||||||
|
'episode': ep
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
|
|
||||||
@@ -142,6 +152,7 @@ def peliculas(item, f=None, ):
|
|||||||
director = ''
|
director = ''
|
||||||
year = ''
|
year = ''
|
||||||
genres = []
|
genres = []
|
||||||
|
genre = ''
|
||||||
country = ''
|
country = ''
|
||||||
skip = False
|
skip = False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user