janbar / noson-app

The essential to control music from your SONOS devices on Linux platforms
GNU General Public License v3.0
340 stars 28 forks source link

Bandcamp service not listing music. #39

Open NullP01nt opened 6 years ago

NullP01nt commented 6 years ago

After adding my Bandcamp account to Noson (Ubuntu 16.04, PPA install), it fails to list the music I have collected on my account. I'm not sure what information to provide in order for you to diagnose the problem.

janbar commented 6 years ago

Never try this service until now. I will try it soon.

I personally tested successfully the following services.

Known services to failed are:

janbar commented 6 years ago

@NullP01nt , I added a patch to handle a missed item type provided by this service. Now I can browse containers. But all is empty using my account because I didn't pay something there. So it could work with latest release from PPA (noson-app-2.8~201806021617~ubuntu16.04.1). If not then we could check your debug log.

NullP01nt commented 6 years ago

@janbar, I just updated to the latest PPA release as of today (2018-06-04). The music on my bandcamp account is now being listed, but unable to be played. Technically, this would close this bug ticket. I would like to post a debug log, but have no idea where exactly all my credentials are being thrown around. If you could tell me how to sanitize a log file I just made, I can upload it somewhere. Just in a casual glance, I noticed several 500 HTTP errors on behalf of my Sonos Play:1 while trying to play media from Bandcamp.

janbar commented 6 years ago

You have to cleanup all strings encapsulated by <token>...</token> and <key>...</key> from the debug log and finally you could email me the compressed file.

NullP01nt commented 6 years ago

I've sent you a gzip-compressed log file. Hope it helps.

janbar commented 6 years ago

So no good news about this service. This service authorizes only one session at time. Since registered services credentials can't be retrieved from sonos devices, the app request you to register again and to get a valid session. That invalidates the previous session registered by sonos device and then trying to play track fails. If you refresh the credentials for the sonos device, the registered token by the app will be expired by Bandcamp. For now I haven't solution. It seems the only way is to be able to retrieve registered services credentials from sonos device, but the content is encrypted. I suspect that all services using DeviceLink method to authenticate have the same behavior. Hopefully major services uses AppLink method (Spotify, Plex ...) or Login method (Deezer ...).