mb-userscripts
mb-userscripts copied to clipboard
support Bandcamp pages with custom (non-Bandcamp) domain
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
a couple examples
- https://mumbleetc.com/
- https://music.businesscasual.biz/music
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... 😅
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?
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)...
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)?