mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-13 06:27:26 +08:00
[vevo] sort featured artists
This commit is contained in:
parent
970bb55bdf
commit
317ec70257
@ -158,12 +158,13 @@ class VevoIE(VevoBaseIE):
|
|||||||
|
|
||||||
uploader = None
|
uploader = None
|
||||||
artist = None
|
artist = None
|
||||||
featured_artist = None
|
featured_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'] if featured_artist is None else '%s & %s' % (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:
|
||||||
@ -212,8 +213,8 @@ class VevoIE(VevoBaseIE):
|
|||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
track = meta['title']
|
track = meta['title']
|
||||||
if featured_artist:
|
if featured_artists:
|
||||||
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
|
||||||
|
|
||||||
is_explicit = meta.get('explicit')
|
is_explicit = meta.get('explicit')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user