mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-04 20:11:44 -05:00
[PromoDJ] Add music format ids
This commit is contained in:
parent
1b3c186424
commit
99dec4d6ed
1 changed files with 6 additions and 4 deletions
|
@ -155,10 +155,11 @@ def _parse_media_data(self, media_data, id):
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
formats = [traverse_obj(source, {
|
formats = [{
|
||||||
'url': ('URL', {url_or_none}),
|
'format_id': 'lossy',
|
||||||
'size': ('size', {int_or_none}),
|
'url': traverse_obj(source, ('URL', {url_or_none})),
|
||||||
}) for source in traverse_obj(media_data, ('sources'))]
|
'size': traverse_obj(source, ('size', {int_or_none})),
|
||||||
|
} for source in traverse_obj(media_data, ('sources'))]
|
||||||
thumbnails = [{
|
thumbnails = [{
|
||||||
'url': url,
|
'url': url,
|
||||||
} for url in traverse_obj(media_data, ('coverURL', ('600', '1200', '2000'))) if url_or_none(url)]
|
} for url in traverse_obj(media_data, ('coverURL', ('600', '1200', '2000'))) if url_or_none(url)]
|
||||||
|
@ -855,6 +856,7 @@ def _real_extract(self, url):
|
||||||
metadata['formats'][0]['abr'] = int(bitrate)
|
metadata['formats'][0]['abr'] = int(bitrate)
|
||||||
elif url_or_none(url):
|
elif url_or_none(url):
|
||||||
metadata['formats'].append({
|
metadata['formats'].append({
|
||||||
|
'format_id': 'lossless',
|
||||||
'url': url,
|
'url': url,
|
||||||
'abr': int(bitrate),
|
'abr': int(bitrate),
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue