mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-26 18:34:32 +01:00
[vevo] support multiple featured artists
This commit is contained in:
parent
b07ea5eaec
commit
3d586c09b2
@ -214,13 +214,14 @@ class VevoIE(VevoBaseIE):
|
||||
|
||||
uploader = None
|
||||
artist = None
|
||||
featured_artist = None
|
||||
featured_artists = []
|
||||
artists = video_info.get('artists')
|
||||
for curr_artist in artists:
|
||||
if curr_artist.get('role') == 'Featured':
|
||||
featured_artist = curr_artist['name']
|
||||
featured_artists.append(curr_artist['name'])
|
||||
else:
|
||||
artist = uploader = curr_artist['name']
|
||||
featured_artists.sort()
|
||||
|
||||
formats = []
|
||||
for video_version in video_versions:
|
||||
@ -269,8 +270,8 @@ class VevoIE(VevoBaseIE):
|
||||
self._sort_formats(formats)
|
||||
|
||||
track = video_info['title']
|
||||
if featured_artist:
|
||||
artist = '%s ft. %s' % (artist, featured_artist)
|
||||
if len(featured_artists) > 0:
|
||||
artist = '%s ft. %s' % (artist, ' & '.join(featured_artists))
|
||||
title = '%s - %s' % (artist, track) if artist else track
|
||||
|
||||
genres = video_info.get('genres')
|
||||
|
Loading…
Reference in New Issue
Block a user