Reliably fill "position" field in tracks
This commit is contained in:
parent
20fe6b225a
commit
48837d80fa
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"name": "bandcamp-fetch",
|
||||
"name": "@encode42/bandcamp-fetch",
|
||||
"version": "1.2.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "bandcamp-fetch",
|
||||
"name": "@encode42/bandcamp-fetch",
|
||||
"version": "1.2.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
@ -30,7 +30,7 @@
|
|||
"typescript": "^4.9.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
"node": ">=15"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/runtime": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@encode42/bandcamp-fetch",
|
||||
"version": "1.2.1",
|
||||
"version": "1.2.3",
|
||||
"description": "Scrape Bandcamp content (supports Cloudflare Pages)",
|
||||
"scripts": {
|
||||
"build": "npm run prepare",
|
||||
|
|
|
@ -64,7 +64,8 @@ export default class TrackInfoParser {
|
|||
type: 'track',
|
||||
name: basic.name,
|
||||
description: basic.description.replaceAll('\r\n', '\n') || '',
|
||||
url: basic['@id']
|
||||
url: basic['@id'],
|
||||
position: extra.current?.track_number
|
||||
};
|
||||
|
||||
const imageUrl = reformatImageUrl(basic.image, opts.albumImageFormat);
|
||||
|
|
Loading…
Reference in New Issue
Block a user