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