- Fix item.nfo e item.strm_path

- Fix vari
 - N.B. Ove possibile usare item.clone() al posto di Item()
This commit is contained in:
Alhaziel01
2020-06-19 15:27:20 +02:00
parent a43d0d7050
commit c06bbb9795
30 changed files with 213 additions and 1119 deletions
+19 -35
View File
@@ -27,12 +27,7 @@ def mainlist(item):
return item
def itemlistHook(itemlist):
itemlist.append(
support.Item(
channel=item.channel,
title=support.typo('Cerca...', 'bold color kod'),
url = item.url,
action='search',
thumbnail=support.thumb(thumb='search.png')))
item.clone(title=support.typo('Cerca...', 'bold color kod'), action='search', thumbnail=support.thumb(thumb='search.png')))
support.channel_config(item, itemlist)
return itemlist
return locals()
@@ -45,16 +40,12 @@ def radio(item):
if data.matches:
for title, location, url, quality, song, type, thumbnail in data.matches:
itemlist.append(
support.Item(
channel = item.channel,
title = support.typo(title, 'bold') + support.typo(quality + ' kbps','_ [] bold color kod'),
thumbnail = thumbnail,
url = url,
contentType = 'music',
plot = support.typo(location, 'bold') + '\n' + song,
action = 'findvideos'
)
)
item.clone(title = support.typo(title, 'bold') + support.typo(quality + ' kbps','_ [] bold color kod'),
thumbnail = thumbnail,
url = url,
contentType = 'music',
plot = support.typo(location, 'bold') + '\n' + song,
action = 'findvideos'))
else:
matches = support.match(data.data, patron= r'text="(?P<title>[^\("]+)(?:\([^\)]+\))?" URL="(?P<url>[^"]+)" (?:guide_id="[^"]+" )?(?:stream_type="[^"]+" )?topic_duration="(?P<duration>[^"]+)" subtext="(?P<plot>[^"]+)" item="[^"]+" image="(?P<thumb>[^"]+)"').matches
if matches:
@@ -62,29 +53,22 @@ def radio(item):
infoLabels={}
infoLabels['duration'] = duration
itemlist.append(
support.Item(
channel = item.channel,
title = support.typo(title, 'bold'),
thumbnail = thumbnail,
infolLbels = infoLabels,
url = url,
contentType = 'music',
plot = plot,
action = 'findvideos'
)
)
item.clone(title = support.typo(title, 'bold'),
thumbnail = thumbnail,
infolLbels = infoLabels,
url = url,
contentType = 'music',
plot = plot,
action = 'findvideos'))
else:
matches = support.match(data.data, patron= r'text="(?P<title>[^"]+)" URL="(?P<url>[^"]+)"').matches
for title, url in matches:
itemlist.append(
support.Item(
channel = item.channel,
title = support.typo(title, 'bold'),
thumbnail = item.thumbnail,
url = url,
action = 'radio'
)
)
item.clone(channel = item.channel,
title = support.typo(title, 'bold'),
thumbnail = item.thumbnail,
url = url,
action = 'radio'))
return itemlist