Fix youtube mixes

They cannot be viewed on their own, so change url in items to
go to the video+playlist instead

Signed-off-by: Jesús <heckyel@hyperbola.info>
This commit is contained in:
James Taylor
2020-12-18 12:55:12 -08:00
committed by Jesús
parent a16b05af80
commit 6b6a6653a0
2 changed files with 13 additions and 2 deletions

View File

@@ -502,10 +502,16 @@ def add_extra_html_info(item):
item['video_info'] = json.dumps(video_info)
elif item['type'] == 'playlist' and item['playlist_type'] == 'radio':
item['url'] = concat_or_none(
URL_ORIGIN,
'/watch?v=', item['first_video_id'],
'&list=', item['id']
)
elif item['type'] == 'playlist':
item['url'] = (URL_ORIGIN + '/playlist?list=' + item['id']) if item.get('id') else None
item['url'] = concat_or_none(URL_ORIGIN, '/playlist?list=', item['id'])
elif item['type'] == 'channel':
item['url'] = (URL_ORIGIN + "/channel/" + item['id']) if item.get('id') else None
item['url'] = concat_or_none(URL_ORIGIN, "/channel/", item['id'])
def parse_info_prepare_for_html(renderer, additional_info={}):