Backend for listening to bandcamp
This backend allows searching bandcamp and playing the free 128kbps MP3 streams.
Initial support has been added (as of v1.1.0) for browsing and playing your bandcamp collection. Authentication is a hassle, and described below. Expect things to be wonky, and please create an issue when you encounter things that don’t work. Also this is slow because it requires scraping the bandcamp website instead of using an API. (This plugin will attempt to play the higher quality mp3-v0 streams of songs in your collection.)
Install by running:
sudo python3 -m pip install Mopidy-Bandcamp
If you wish to browse/play music in your collection, then you’ll need to authenticate to bandcamp.com.
Authentication is done by grabbing your
identity token from the cookies of the
bandcamp website. Point your browser at https://bandcamp.com and log in if you aren’t already.
For chrome you can simply go to chrome://settings/cookies/detail?site=bandcamp.com to see the cookies for bandcamp.com. Click on “identity” and copy the data listed under “Content”.
For Firefox and most other browsers, open up the browser’s developer tools (usually by pressing Ctrl-Shift-I or F12). When the tools pop up, navigate to the “Storage” tab, and then select “Cookies” to view the site’s cookies. Copy the value from the “identity” cookie.
It should look something like this:
Now add it to your Mopidy config file like so:
[bandcamp] identity = 7%09xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%3D%09%7B%22ex%22%3Ax%2C%22id%22%3Axxxxxxxxxx%7D
Albums and tracks can be searched for or browsed. Additionaly, you can force Mopidy-Bandcamp to scrape a bandcamp URL for you by just prepending the url with “bandcamp:” and adding it to Mopidy. For example, using mpc on the command line:
$ mpc add "bandcamp:https://louiezong.bandcamp.com/album/jazz"
Would add the bandcamp album to the queue.
Note: Adding an artist by clicking on the artist in a search result or by manually scraping an artist’s bandcamp page can take a long time depending on the artist. This is because Mopidy-Bandcamp tries to load the entirety of the artist’s discography.
As of v1.1.2 a simple webclient has been added to allow for more easily scraping a page. Not by going to http://hostname:6680/bandcamp/ and entering in a url (which you can do), but by using the following as a URL for a bookmark in your web browser:
Note: Replace hostname and 6680 with your mopidy server’s hostname and configured HTTP port.
Now when you’re browsing bandcamp you can simply click that bookmark to add the current page to Mopidy. (This works in Chrome and Firefox. I haven’t bothered checking anything else.)
[bandcamp] discover-tags = French House, Brit Pop, Tokyo, New Wave, Industrial
identity- Identity token from your bandcamp cookies to authenticate with Bandcamp.
collection_items- Number of items (per page) to fetch from your collection (if authenticated). Default: 50
discover_tags- List of tags to discover. You’ll really want to change this to any tags that interest you.
discover_genres- List of bandcamp’s genres to discover. You’ll only want to edit this to remove unwanted genres.
discover_pages- Number of pages to load in the browse discover sections. Default: 1
image_sizes- a list of ids for image sizes to return to mopidy for album art. Default: 10, 5, 2 (1200x1200, 700x700, 350x350)
Bandcamp image size ids:
|1||Original (usually big)|
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size Mopidy_Bandcamp-1.1.5-py3-none-any.whl (14.4 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size Mopidy-Bandcamp-1.1.5.tar.gz (13.5 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for Mopidy_Bandcamp-1.1.5-py3-none-any.whl