beets icon indicating copy to clipboard operation
beets copied to clipboard

Bandcamp metadata source plugin

Open Schweinepriester opened this issue 9 years ago • 11 comments

Couldn't find an issue for this, therefore: Has Bandcamp been considered as a source in general? For the autotagger, for cover art, lyrics, genre, etc.?

I know that the API is deprecated, see https://bandcamp.com/developer, and no new version anywhere close, but what about scraping stuff?

Has this been considered?

Schweinepriester avatar Jun 18 '15 09:06 Schweinepriester

Seems like a reasonable idea! That is, if we can confirm that scraping their site doesn't violate their ToS.

sampsyo avatar Jun 18 '15 21:06 sampsyo

Sadly i think it would violate their ToS :/

Section "Rules and Conduct":

Additionally, you shall not: [...] (v) use manual or automated software, devices, or other processes to “crawl” or “spider” any page of the Site.

Or would that not apply in this case?

I'll see if i can find anything about a new API or something.

Schweinepriester avatar Jun 18 '15 21:06 Schweinepriester

Doesn't look good for anything official. I asked though, lets see if and what they respond...

There is stuff, like

  • https://www.npmjs.com/package/node-bandcamp
  • https://www.npmjs.com/package/bc-search

which would work, i guess. But unofficial and potential against their ToS (and in beets' case: not Python)? Not so cool.

Bandcamp would be a really great source, though, especially for data of/from new/small artists. I think Bandcamp encourages good tags, lyrics, album art and so on...

Schweinepriester avatar Jun 18 '15 21:06 Schweinepriester

Sure, borrowing techniques from those Node modules might be a good way to go.

sampsyo avatar Jun 19 '15 01:06 sampsyo

a lot of my digital media is from BC, so id love for this to get solved...

BC, for the most part, has great tagging. it suggests several main ones (ie. Techno, House, Experimental) and then allows the users to add their own tags, sometimes including where theyre from, etc (which is not very useful most of the time)

what if the plugin added a feature that allowed you to pull from BC on auto import, but didnt include functionality to pull data in massive chunks all at once? (not a programmer, just a musician/dj that loves beets)

i think its insane BC hasnt looked at this...they ARE supposed to be SF superstar music hackers afterall...

workerparasite303 avatar Feb 02 '16 03:02 workerparasite303

👍 +1 for this feature :)

discopatrick avatar Aug 17 '16 01:08 discopatrick

Dreaming about this feature again… :)

Just imported http://fallofanempireband.bandcamp.com/album/croweater-an-echo-in-the-bone and, while its thankfully on musicbrainz, all the lyrics only exist on bandcamp :o

They even utilize http://schema.org/, look at that beautiful markup/DOM.

Maybe one/we could write a plugin, whereby beets wouldn't be associated with any ToS violating…? 0:-)

Schweinepriester avatar Sep 18 '16 22:09 Schweinepriester

Huh! Yeah, it does seem feasible… especially for the lyrics.

sampsyo avatar Sep 20 '16 21:09 sampsyo

I just tried this plugin. Nice job, @unrblt! https://github.com/unrblt/beets-bandcamp

It worked fine for me (Windows 10 Pro, Python 2.7.12 32-bit). For installation step one I did need to create a folder and then specify it as my pluginpath in beets' config.yaml. The plugin can purportedly fetch lyrics and art, but I didn't try either.

Note: When importing four albums that I just purchased from Bandcamp, two had entries at MusicBrainz and apparently beets defaulted to using that (which resulted in a few small title changes). Metadata for the other two albums, which had no MusicBrainz entries, were fetched from Bandcamp.

I just started using beets two days ago and I don't know of a way to force it to prefer one metadata source over another. I'm not too bothered that a couple of these albums now differ slightly from their Bandcamp metadata. However, if you want to fetch lyrics from Bandcamp, for an album that has a MusicBrainz entry, beets (and/or the plugin) might require some modification.

mo65535 avatar Sep 28 '16 03:09 mo65535

I wrote that plugin, I'm glad you liked it @mo65535 ! The code now feels a little hackish and I'm sure it can be improved but I have been using it for over an year now without problems.

When importing four albums that I just purchased from Bandcamp, two had entries at MusicBrainz and apparently beets defaulted to using that

That is by design, but changing the source_weight for the bandcamp plugin in your config should work (though I didn't test it). Something like:

bandcamp:
    source_weight: 0

unrblt avatar Sep 28 '16 13:09 unrblt

Reviving this old issue to mention that @unrblt's plugin has been seen to be broken for a while and thus been forked and renamed to beetcamp. To use it, install it in your beets virtual environment (for example pipx inject beets beetcamp) and add it to your plugins list. It uses the same name as before: bandcamp. See the readme for configuration.

I heavily depend on Bandcamp myself (just checked that 4260 / 4683 items have data_source=bandcamp) so it's been helping a lot.

Regarding this issue and, I guess, a possibility of its integration into beets, - I doubt it's possible since it's been licensed with GPLv2 from the beginning and I think it's incompatible with MIT (happy to be corrected here if that's not the case).

snejus avatar Mar 15 '22 19:03 snejus