mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 14:14:54 +01:00
[bandcamp] Extract track_number (closes #17266)
This commit is contained in:
parent
73f3bdbeb4
commit
14b7a24c19
|
@ -44,6 +44,17 @@ class BandcampIE(InfoExtractor):
|
||||||
'title': 'Ben Prunty - Lanius (Battle)',
|
'title': 'Ben Prunty - Lanius (Battle)',
|
||||||
'uploader': 'Ben Prunty',
|
'uploader': 'Ben Prunty',
|
||||||
},
|
},
|
||||||
|
}, {
|
||||||
|
'url': 'https://relapsealumni.bandcamp.com/track/hail-to-fire',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '2584466013',
|
||||||
|
'ext': 'mp3',
|
||||||
|
'title': 'Hail to Fire',
|
||||||
|
'track_number': 5,
|
||||||
|
},
|
||||||
|
'params': {
|
||||||
|
'skip_download': True,
|
||||||
|
},
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
|
@ -82,6 +93,7 @@ def _real_extract(self, url):
|
||||||
'thumbnail': thumbnail,
|
'thumbnail': thumbnail,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
'duration': float_or_none(data.get('duration')),
|
'duration': float_or_none(data.get('duration')),
|
||||||
|
'track_number': int_or_none(data.get('track_num')),
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
raise ExtractorError('No free songs found')
|
raise ExtractorError('No free songs found')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user