Skip to content

bandcamp_importer: enable MB Release links on Discography pages (release lists)#609

Merged
zas merged 5 commits intomurdos:masterfrom
arsinclair:feat/implement-discography-page-linking
Apr 22, 2025
Merged

bandcamp_importer: enable MB Release links on Discography pages (release lists)#609
zas merged 5 commits intomurdos:masterfrom
arsinclair:feat/implement-discography-page-linking

Conversation

@arsinclair
Copy link
Collaborator

@arsinclair arsinclair commented Apr 21, 2025

  • closes Idea: Show MB release link on Bandcamp release lists #61;
  • I had to expand the scope for the script, it would run pretty much on any site right now and if the internal Bandcamp data structure is not found it will exit; this was necessary because sometimes bandcamp pages are behind a white-label, so it is not sufficient to match just the *.bandcamp.com;
  • tested the new site inclusion regex on the following list of urls:
https://eprom.bandcamp.com/album/tracks-from-the-vault/
https://eprom.bandcamp.com/track/tracks-from-the-vault
https://whitelabel-test.com/track/tracks-from-the-vault
https://whitelabel-test.com/album/tracks-from-the-vault
https://eprom.bandcamp.com/music
https://eprom.bandcamp.com/
https://eprom.bandcamp.com

https://eprom.bandcamp.com/merch/     #shouldn't be included
https://eprom.bandcamp.com/merch     #shouldn't be included
https://eprom.bandcamp.com/community/     #shouldn't be included
https://eprom.bandcamp.com/community     #shouldn't be included
  • make sure to turn on the option to 'Hide white space changes' on GH, as there's a lot of white space shifts due to the new conditional that wraps the old logic;
  • any feedback is welcome!
End result

image

@arsinclair arsinclair force-pushed the feat/implement-discography-page-linking branch from f778311 to a95a8d1 Compare April 21, 2025 07:02
@zas zas self-requested a review April 21, 2025 11:08
Copy link
Collaborator

@zas zas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tested, it works well, version needs to be updated though

@zas zas requested a review from murdos April 21, 2025 11:09
@zas
Copy link
Collaborator

zas commented Apr 21, 2025

@arsinclair Can you please fix conflicts? Thanks.

@arsinclair
Copy link
Collaborator Author

arsinclair commented Apr 21, 2025

@zas, fixed! Please let me know if I should update the version or there's a process for that. Thanks :)

Actually, I realised the version is just the date, so I updated it.

@arsinclair arsinclair requested a review from zas April 21, 2025 22:12
Copy link
Collaborator

@zas zas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are still few errors reported by eslint, fix those and I think we are good to merge.

@arsinclair
Copy link
Collaborator Author

arsinclair commented Apr 22, 2025

Weirdly I ran it locally and there were no errors. Perhaps I need to reinstall the dependencies, it seems prettier was upgraded recently.


I reinstalled the dependencies, re-ran prettier and pushed the result. Unfortunately, I can no longer run eslint locally, here's the error:

> musicbrainz-userscripts@1.0.0 lint
> npm run eslint


> musicbrainz-userscripts@1.0.0 eslint
> eslint .


Oops! Something went wrong! :(

ESLint: 9.25.1

ESLint couldn't find an eslint.config.(js|mjs|cjs) file.

From ESLint v9.0.0, the default configuration file is now eslint.config.js.
If you are using a .eslintrc.* file, please follow the migration guide
to update your configuration file to the new format:

https://eslint.org/docs/latest/use/configure/migration-guide

If you still have problems after following the migration guide, please stop by
https://eslint.org/chat/help to chat with the team.

Hopefully it runs fine on the CI.

@arsinclair arsinclair requested a review from zas April 22, 2025 01:31
@zas
Copy link
Collaborator

zas commented Apr 22, 2025

Unfortunately, I can no longer run eslint locally

We didn't migrate the config yet (it changed with eslint 9). But it works if you set env var ESLINT_USE_FLAT_CONFIG=false

Copy link
Collaborator

@zas zas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zas zas merged commit bece75c into murdos:master Apr 22, 2025
2 checks passed
@arsinclair arsinclair deleted the feat/implement-discography-page-linking branch April 22, 2025 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Idea: Show MB release link on Bandcamp release lists

2 participants