aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dlc/extractor/bandcamp.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dlc/extractor/bandcamp.py')
-rw-r--r--youtube_dlc/extractor/bandcamp.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dlc/extractor/bandcamp.py b/youtube_dlc/extractor/bandcamp.py
index 2022e69f8..9dbafe86d 100644
--- a/youtube_dlc/extractor/bandcamp.py
+++ b/youtube_dlc/extractor/bandcamp.py
@@ -99,7 +99,6 @@ class BandcampIE(InfoExtractor):
webpage, 'track info', default='{}')
track_info = self._parse_json(trackinfo_block, title)
-
if track_info:
file_ = track_info.get('file')
if isinstance(file_, dict):
@@ -115,7 +114,7 @@ class BandcampIE(InfoExtractor):
'acodec': ext,
'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_number = int_or_none(track_info.get('track_num'))
duration = float_or_none(track_info.get('duration'))
@@ -126,6 +125,7 @@ class BandcampIE(InfoExtractor):
webpage, key, default=None, group='value')
return data.replace(r'\"', '"').replace('\\\\', '\\') if data else data
+ track = extract('title')
artist = extract('artist')
album = extract('album_title')
timestamp = unified_timestamp(