mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-09 06:33:34 +08:00
[Bandcamp] Added track number for metadata
This commit is contained in:
parent
eebbce5656
commit
c3904b5cc5
@ -44,6 +44,15 @@ class BandcampIE(InfoExtractor):
|
||||
'title': 'Ben Prunty - Lanius (Battle)',
|
||||
'uploader': 'Ben Prunty',
|
||||
},
|
||||
}, {
|
||||
'url': 'https://relapsealumni.bandcamp.com/track/hail-to-fire',
|
||||
'md5': 'fec12ff55e804bb7f7ebeb77a800c8b7',
|
||||
'info_dict': {
|
||||
'id': '2584466013',
|
||||
'ext': 'mp3',
|
||||
'title': 'Hail to Fire',
|
||||
'track_number': 5,
|
||||
},
|
||||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
@ -82,6 +91,7 @@ class BandcampIE(InfoExtractor):
|
||||
'thumbnail': thumbnail,
|
||||
'formats': formats,
|
||||
'duration': float_or_none(data.get('duration')),
|
||||
'track_number': int_or_none(data.get('track_num')),
|
||||
}
|
||||
else:
|
||||
raise ExtractorError('No free songs found')
|
||||
|
Loading…
Reference in New Issue
Block a user