owncloud / music

:notes: Music app for ownCloud
GNU Affero General Public License v3.0
569 stars 199 forks source link

Support for Jamstash #787

Closed PeterRob closed 3 years ago

PeterRob commented 4 years ago

Jamstash (github, player website) can load my music library and add tracks to the play queue, however I can't play the tracks. Support for Jamstash would be a big +ve as it can be hosted on a web server.

paulijar commented 4 years ago

I tested Jamstash already when creating the initial version of the Subsonic support. For some reason, it immediately entered a redirect loop, when it tried to fetch any resources from my server. I suspect that I may have something wrong in my nginx configuration but I couldn't figure out the root cause. I have not seen similar problems with any other client.

paulijar commented 3 years ago

@PeterRob Actually, I managed to make Jamstash work now after I installed it on the same server with Nextcloud. The catch is, that it currently doesn't work with its default settings and has just the behavior you described: the library can be viewed but not played, and any album art is not shown. However, this can be solved by going to the Jamstash settings and by changing Protocol from jsonp to json.

The problem with jsonp protocol is also quite simple, and I shall make it work with the next version of the Music app. The thing is, the client is always supposed to pass another argument callback when it makes an API request with the jsonp format. But for some reason, Jamstash forgets to send this argument when it requests album art or audio stream. Currently, the Music app blocks such malformed requests, but real Subsonic server seems to allow them and just falls back from jsonp format to xml format on such cases. Using different format than requested makes no difference in normal cases as those two API methods return binary content, and the format is irrelevant. But if there was some error in the request handling, then the error message will be in different format than requested, and there is a high chance that Jamstash cannot interpret it.

paulijar commented 3 years ago

Music v1.0.2 is now out, including support for the slightly misbehaving Jamstash client in its default jsonp mode.