mirror of
https://github.com/blackjack4494/yt-dlc.git
synced 2024-12-21 23:33:10 +00:00
merge bandcamp
This commit is contained in:
commit
962cc3ef87
1 changed files with 2 additions and 2 deletions
|
@ -99,7 +99,6 @@ class BandcampIE(InfoExtractor):
|
||||||
webpage, 'track info', default='{}')
|
webpage, 'track info', default='{}')
|
||||||
|
|
||||||
track_info = self._parse_json(trackinfo_block, title)
|
track_info = self._parse_json(trackinfo_block, title)
|
||||||
|
|
||||||
if track_info:
|
if track_info:
|
||||||
file_ = track_info.get('file')
|
file_ = track_info.get('file')
|
||||||
if isinstance(file_, dict):
|
if isinstance(file_, dict):
|
||||||
|
@ -115,7 +114,7 @@ class BandcampIE(InfoExtractor):
|
||||||
'acodec': ext,
|
'acodec': ext,
|
||||||
'abr': int_or_none(abr_str),
|
'abr': int_or_none(abr_str),
|
||||||
})
|
})
|
||||||
track = track_info.get('title')
|
|
||||||
track_id = str_or_none(track_info.get('track_id') or track_info.get('id'))
|
track_id = str_or_none(track_info.get('track_id') or track_info.get('id'))
|
||||||
track_number = int_or_none(track_info.get('track_num'))
|
track_number = int_or_none(track_info.get('track_num'))
|
||||||
duration = float_or_none(track_info.get('duration'))
|
duration = float_or_none(track_info.get('duration'))
|
||||||
|
@ -126,6 +125,7 @@ class BandcampIE(InfoExtractor):
|
||||||
webpage, key, default=None, group='value')
|
webpage, key, default=None, group='value')
|
||||||
return data.replace(r'\"', '"').replace('\\\\', '\\') if data else data
|
return data.replace(r'\"', '"').replace('\\\\', '\\') if data else data
|
||||||
|
|
||||||
|
track = extract('title')
|
||||||
artist = extract('artist')
|
artist = extract('artist')
|
||||||
album = extract('album_title')
|
album = extract('album_title')
|
||||||
timestamp = unified_timestamp(
|
timestamp = unified_timestamp(
|
||||||
|
|
Loading…
Reference in a new issue