Fix release slug not being added to discography
This commit is contained in:
parent
e38c97f774
commit
69715d7d3d
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@encode42/bandcamp-fetch",
|
"name": "@encode42/bandcamp-fetch",
|
||||||
"version": "1.2.4",
|
"version": "1.2.6",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@encode42/bandcamp-fetch",
|
"name": "@encode42/bandcamp-fetch",
|
||||||
"version": "1.2.4",
|
"version": "1.2.6",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bottleneck": "^2.19.5",
|
"bottleneck": "^2.19.5",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@encode42/bandcamp-fetch",
|
"name": "@encode42/bandcamp-fetch",
|
||||||
"version": "1.2.4",
|
"version": "1.2.6",
|
||||||
"description": "Scrape Bandcamp content (supports Cloudflare Pages)",
|
"description": "Scrape Bandcamp content (supports Cloudflare Pages)",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npm run prepare",
|
"build": "npm run prepare",
|
||||||
|
|
|
@ -135,8 +135,11 @@ export default class DiscographyParser {
|
||||||
const results = [];
|
const results = [];
|
||||||
for (const [ url, props ] of Object.entries(items)) {
|
for (const [ url, props ] of Object.entries(items)) {
|
||||||
if (props.type && props.name) {
|
if (props.type && props.name) {
|
||||||
|
const urlParts = url.split('/');
|
||||||
|
|
||||||
const item: Album | Track = {
|
const item: Album | Track = {
|
||||||
url,
|
url,
|
||||||
|
slug: urlParts[urlParts.length - 1],
|
||||||
type: props.type,
|
type: props.type,
|
||||||
name: props.name,
|
name: props.name,
|
||||||
artist: props.artist || {
|
artist: props.artist || {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user