Send to kodi from bandcamp

Bandcamp.com is (very underrated) music streaming/store website and app. I use an addon in kodi which only allows search and play (works OK for this).
https://github.com/peat80/kodi-bandcamp

It would be great to send streams to kodi from the bandcamp app.
would anyone else use this? It’s a great site that actually sends the artists the bulk of the revenue from album/song sales. Artist can also choose to let you stream content before you buy (most do).
I hate spotify, apple music etc etc
thankyou

1 Like

Bandcamp is supposedly supported by YoutubeDl and so should already works with the Yatse Kodi addon.

I’m getting an error “cannot resolve the shared URL”. I’ll try a few variations.

Is anyone else using bandcamp out there? I’ve tried to get send to kodi working from band camp, but just get the above error. I’ll generate some logs and send through.
thanks

Hi, I developed Bandcamp addon there:


Is there any way to team-up with Yatse devs to add support for Link sharing as it’s done for YouTube? I can provide with the proper plugin://plugin.audio.kxmxpxtx.bandcamp URL for you to consume.

@DimaKompot

If the plugin is in official Kodi repo then yes just provide the way to convert bandcamp url to your plugin url and it can be added.

Great addon thankyou. Personally speaking, having the addon working with full functionality removes the need for me to “send to kodi” from bandcamp app/mobile through Yatse.
For full remote function I can always go to addons section in Yatse and menus for bandcamp are displayed.
I’m not saying don’t do it of course, just noting this for anyone.

Hello, new version of bandcamp plugin was just released to the official repository:


In order to send the bandcamp link to the plugin (e.g https://vivabelgrado.bandcamp.com/album/bellavista) you can use following JSON-RPC code:
{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "GUI.ActivateWindow",
    "params": {
        "window": "music",
        "parameters": [
            "plugin://plugin.audio.kxmxpxtx.bandcamp/?mode=url&url=https://vivabelgrado.bandcamp.com/album/bellavista"
        ]
    }
}

It will open the folder with the album, create a playlist and start playing

yes, that’s true, but not convenient at all. Just imagine the situation when you’ve seen a new album on the bandcamp app and wanna listen to it. Currently you have to navigate to the addon, use search (very painful sometimes), and then finally open the album.
with yatse support it can be so much better and in one click only.

Is there other sharable urls like artists / songs? Does it need an account to test?

Does it works with player.open directly? As yatse also support queue for share.

no

no

It create a playlist and plays it directly. You can check the source code:

The plugin doesn’t support adding to the queue yet, but I will add it in the next version. It will work like this, with “queue=true” parameter:

plugin://plugin.audio.kxmxpxtx.bandcamp/?mode=url&queue=true&url=https://vivabelgrado.bandcamp.com/album/bellavista

So you can already use this syntax.

Ok so quickly tested and the plugin correctly support Player.Open

{"id":921,"jsonrpc":"2.0","method":"Player.Open","params":{"item":{"file":"plugin://plugin.audio.kxmxpxtx.bandcamp/?mode=url&url=https%3A%2F%2Fvivabelgrado.bandcamp.com%2Falbum%2Fbellavista"}}}

So should also support queuing without any changes, I will use the player.open / playlist.add way as it’s the proper way to handle those and all others do work like that.

Just a few remarks.

I made Kodi crash quite easily with that command, it’s like 50/50 to either play or crash Kodi.

There’s many other urls that can be shared like https://vivabelgrado.bandcamp.com/ that yet shows the exact same thing as the album view.

Or urls like https://daily.bandcamp.com/seven-essential-releases/this-weeks-essential-releases-may-22

So there’s maybe still some work to do on the addon side to ensure perfect experience :slight_smile:

But since it mostly works I’ll still add support in next release.

you are quite lucky, it crashes 100% for me.
not sure how it should work, functionality of Player.Open with “plugin://” as params.item.file isn’t clear for me.

Well then there’s a bug in the plugin and in Kodi :slight_smile:

Anyway 100% of the plugins I support do work with player.open and playlist.add

For example Youtube/GoogleMusic/Ted/Twitch/Myvideo.de/soundclound/vimeo/stvplay/… should give you plenty of examples about how, unfortunately I’m not a plugin side expert at all :frowning:

I can make it work with params.item.directory, like:

{
    "id": 921,
    "jsonrpc": "2.0",
    "method": "Player.Open",
    "params": {
        "item": {
            "directory": "plugin://plugin.audio.kxmxpxtx.bandcamp/?mode=url&url=https%3A%2F%2Fvivabelgrado.bandcamp.com%2Falbum%2Fbellavista"
        }
    }
}

it doesn’t crash at all and it makes sense to me since this is not just file, but a directory (album). is it possible for you to use “directory” there?

little bit of reasoning behind my initial proposal with “GUI.ActivateWindow” for music addon: “Player.Open” works, but:

  • opens the player in the background
  • it isn’t possible to open playlist from it (at least I didn’t find it)

So the best way seen to me was: open directory in kodi (that will display all items like a playlist) and then automatically play the first one. But if you have common implementation using Player.Open for each and every addon - obviously I will go with it, np (but pls use “directory” instead of “file”)

This is not a directory and I have no way to know if it’s a directory or a file.

Player.Open as file calling plugin can expand to multiple files this works when playing youtube playlists for example.

Moving to directory will fails for all other addons.

If you want something specific because your addon can not work as all others then you’ll need to make a PR to Yatse plugin https://github.com/Tolriq/repository.yatse.kodi with a proper integration.

I checked how it works for SoundCloud plugin. Huh, that’s really not easy thing to do without “directory”.
Was able to get it working.
Posted topic on Kodi forum with my findings in case somebody is interested:
https://forum.kodi.tv/showthread.php?tid=354733&pid=2952379

Added functionality to the develop branch now:


If you want to test it - you can just download develop branch as zip and install it
Works with Player.Open:

{
“id”: 921,
“jsonrpc”: “2.0”,
“method”: “Player.Open”,
“params”: {
“item”: {
“file”: “plugin://plugin.audio.kxmxpxtx.bandcamp/?mode=url&url=https%3A%2F%2Fvivabelgrado.bandcamp.com%2Falbum%2Fbellavista”
}
}
}

And playlist.add

{
“id”: 921,
“jsonrpc”: “2.0”,
“method”: “playlist.add”,
“params”: {
“playlistid”: 0,
“item”: {
“file”: “plugin://plugin.audio.kxmxpxtx.bandcamp/?mode=url&url=https://shlemrock.bandcamp.com/track/–7”

    }
}

}

or you can share apk with me at pm and I will test it.
Thx for the work!

You can join beta for Yatse on Play Store, 10.2.5 beta 2 already have it.