mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-01 00:52:58 +01:00
fix python2
This commit is contained in:
parent
11984c7467
commit
65c5e044c7
@ -48,7 +48,7 @@ def _real_extract(self, url):
|
|||||||
playables = json.loads(playables)
|
playables = json.loads(playables)
|
||||||
|
|
||||||
# Find first track with matching ID (always the first one listed?)
|
# Find first track with matching ID (always the first one listed?)
|
||||||
track = next(filter(lambda t: t['id'] == int(track_id), playables['tracks']))
|
track = next(t for t in playables['tracks'] if t['id'] == int(track_id))
|
||||||
|
|
||||||
# Construct title from artist(s), track name, and mix name
|
# Construct title from artist(s), track name, and mix name
|
||||||
title = ', '.join((a['name'] for a in track['artists'])) + ' - ' + track['name']
|
title = ', '.join((a['name'] for a in track['artists'])) + ' - ' + track['name']
|
||||||
|
Loading…
Reference in New Issue
Block a user