supporto ai tag qualità filmpertutti e tantifilm
tipologia movie per le novità
This commit is contained in:
@@ -155,6 +155,6 @@ def newest(categoria):
|
||||
def findvideos(item):
|
||||
if item.contentType == 'movie':
|
||||
data = httptools.downloadpage(item.url).data
|
||||
return support.server(item, data=data)
|
||||
return support.server(item, data=data, patronTag='Versione: <[^>]+>([^<]+)')
|
||||
else:
|
||||
return support.server(item, item.url)
|
||||
|
||||
@@ -203,4 +203,5 @@ def findvideos(item):
|
||||
log('URLS',urls)
|
||||
|
||||
itemlist = support.server(item, urls)
|
||||
support.addQualityTag(item, itemlist, data, 'Keywords:\s*(?:<span>)?([^<]+)')
|
||||
return itemlist
|
||||
|
||||
@@ -1236,7 +1236,7 @@ def addQualityTag(item, itemlist, data, patron):
|
||||
"MP3": "codec per compressione audio utilizzato MP3.",
|
||||
"RESYNC": "il film è stato lavorato e re sincronizzato con una traccia audio. A volte potresti riscontrare una mancata sincronizzazione tra audio e video.",
|
||||
}
|
||||
qualityStr = scrapertools.find_single_match(data, patron).strip()
|
||||
qualityStr = scrapertools.find_single_match(data, patron).strip().upper()
|
||||
if PY3:
|
||||
qualityStr = qualityStr.encode('ascii', 'ignore')
|
||||
else:
|
||||
@@ -1244,11 +1244,19 @@ def addQualityTag(item, itemlist, data, patron):
|
||||
|
||||
if qualityStr:
|
||||
try:
|
||||
splitted = qualityStr.split('.')
|
||||
video = splitted[-1]
|
||||
audio = splitted[-2]
|
||||
descr = typo(video + ': ', 'color kod') + defQualVideo.get(video.upper(), '') + '\n' +\
|
||||
typo(audio + ': ', 'color kod') + defQualAudio.get(audio.upper(), '')
|
||||
video, audio, descr = None, None, ''
|
||||
for tag in defQualVideo:
|
||||
if tag in qualityStr:
|
||||
video = tag
|
||||
break
|
||||
for tag in defQualAudio:
|
||||
if tag in qualityStr:
|
||||
audio = tag
|
||||
break
|
||||
if video:
|
||||
descr += typo(video + ': ', 'color kod') + defQualVideo.get(video, '') + '\n'
|
||||
if audio:
|
||||
descr += typo(audio + ': ', 'color kod') + defQualAudio.get(audio, '') + '\n'
|
||||
except:
|
||||
descr = ''
|
||||
itemlist.insert(0,
|
||||
|
||||
@@ -253,7 +253,7 @@ def set_view_mode(item, parent_item):
|
||||
xbmcplugin.setContent(handle=int(sys.argv[1]), content='')
|
||||
xbmc.executebuiltin('Container.SetViewMode(%s)' % 55)
|
||||
|
||||
elif (item.contentType in ['movie'] and parent_item.action in ['peliculas']) \
|
||||
elif (item.contentType in ['movie'] and parent_item.action in ['peliculas', 'novedades']) \
|
||||
or (item.channel in ['videolibrary'] and parent_item.action in ['list_movies']) \
|
||||
or parent_item.action in ['now_on_tv', 'now_on_misc', 'now_on_misc_film']:
|
||||
mode('movie', 'movies')
|
||||
|
||||
Reference in New Issue
Block a user