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",
|
"version": "1.2.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "bandcamp-fetch",
|
"name": "@encode42/bandcamp-fetch",
|
||||||
"version": "1.2.1",
|
"version": "1.2.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
"typescript": "^4.9.5"
|
"typescript": "^4.9.5"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18"
|
"node": ">=15"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/runtime": {
|
"node_modules/@babel/runtime": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@encode42/bandcamp-fetch",
|
"name": "@encode42/bandcamp-fetch",
|
||||||
"version": "1.2.1",
|
"version": "1.2.3",
|
||||||
"description": "Scrape Bandcamp content (supports Cloudflare Pages)",
|
"description": "Scrape Bandcamp content (supports Cloudflare Pages)",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npm run prepare",
|
"build": "npm run prepare",
|
||||||
|
|
|
@ -64,7 +64,8 @@ export default class TrackInfoParser {
|
||||||
type: 'track',
|
type: 'track',
|
||||||
name: basic.name,
|
name: basic.name,
|
||||||
description: basic.description.replaceAll('\r\n', '\n') || '',
|
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);
|
const imageUrl = reformatImageUrl(basic.image, opts.albumImageFormat);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user