mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-22 16:44:32 +01:00
fix for albums/podcasts with empty artist list
This commit is contained in:
parent
1d31b7ca04
commit
9fb4a93541
@ -219,7 +219,9 @@ class YandexMusicAlbumIE(YandexMusicPlaylistBaseIE):
|
||||
|
||||
entries = self._build_playlist([track for volume in album['volumes'] for track in volume])
|
||||
|
||||
title = '%s - %s' % (album['artists'][0]['name'], album['title'])
|
||||
artists = album['artists']
|
||||
artist_name = artists[0]['name'] if artists else "UnknownArtist"
|
||||
title = '%s - %s' % (artist_name, album['title'])
|
||||
year = album.get('year')
|
||||
if year:
|
||||
title += ' (%s)' % year
|
||||
|
Loading…
Reference in New Issue
Block a user