Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support Bandcamp pages with custom (non-Bandcamp) domain #637

Open
UltimateRiff opened this issue Feb 20, 2023 · 4 comments
Open

support Bandcamp pages with custom (non-Bandcamp) domain #637

UltimateRiff opened this issue Feb 20, 2023 · 4 comments

Comments

@UltimateRiff
Copy link

many artists and labels have their Bandcamp pages on a custom domain, and it would be nice to be able to use these. even if you'd have to manually paste the album URL, that would still be nicer than it currently is

@UltimateRiff
Copy link
Author

UltimateRiff commented Feb 20, 2023

a couple examples

this is for Enhanced Cover Art Uploads btw, I haven't figured out how to add labels yet, if that's even possible for non-contributers... 😅

@ROpdebee
Copy link
Owner

ROpdebee commented Apr 23, 2023

The issue with these sort of custom domains is that ECAU relies on the domain name to determine which provider needs to be called, if any. We obviously cannot add every custom Bandcamp domain to the Bandcamp provider, so we'd need additional logic to dispatch to the Bandcamp provider on those pages. A (general, not limited to Bandcamp) solution would be to detect some site fingerprint (unique HTML elements, HTTP headers, ...) and then treat the page as Bandcamp. It'd also require adding import buttons for every external URL. I think it's best to wait with this until there's a generic provider (#305), so I'll mark it as blocked for now.

Also, both of your examples redirect to a standard Bandcamp domain. I thought the "canonical" domain was the custom one, has that changed recently?

@UltimateRiff
Copy link
Author

UltimateRiff commented May 27, 2023

I don't think they have? I know my current Firefox setup shows me the bandcamp.com URL, but when I use my Bandcamp importer script, it adds the custom URL to the release (tested with the most recent Mumble Etc release)...

@Maffsie
Copy link

Maffsie commented Nov 9, 2023

I ran into this today while importing artwork from a Halley Labs release (https://halleylabs.com). I worked around it by modifying the script, changing the following (around line 838):

      _defineProperty(this, "supportedDomains", ['*.bandcamp.com']);
      _defineProperty(this, "favicon", 'https://s4.bcbits.com/img/favicon/favicon-32x32.png');
      _defineProperty(this, "name", 'Bandcamp');
      _defineProperty(this, "urlRegex", /^(.+)\.bandcamp\.com\/(track|album)\/([^/]+)(?:\/|$)/);

to the following:

      _defineProperty(this, "supportedDomains", ['*.bandcamp.com','halleylabs.com']);
      _defineProperty(this, "favicon", 'https://s4.bcbits.com/img/favicon/favicon-32x32.png');
      _defineProperty(this, "name", 'Bandcamp');
      _defineProperty(this, "urlRegex", /^((.+)\.bandcamp|halleylabs)\.com\/(track|album)\/([^/]+)(?:\/|$)/);

Which worked as a temporary modification, but I wonder if this could be made a setting or prompt? When the URL is pasted in normally, it'll just say "This URL isn't recognised and isn't a direct link to a glossy jpeg", but in the case of Bandcamp (and any other providers of cover art where individual labels or artists can have their own domains) maybe it could offer a choice of treating it as a Bandcamp URL temporarily (if not storing it for later reuse)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants