owncloud / music

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

Update Subsonic Api to v 1.12.0 #757

Closed powerlocke-ctrl closed 4 years ago

powerlocke-ctrl commented 4 years ago

I've installed Music App to my Nextcloud 18.0.4. Know I was trying to connect my Android Device to cloud with using Subsonic Api and Airsonic Player. Because of conection errors I contacted developer from the app, who told me, api-version of my server is too old. Installed 1.10.1, requires is minimum 1.12.0. Is there any chance to fix it or a tutorial how I can update myself?

Or has anyone a suggestion, which Android app works with https-connections and is not updates since months/years?

JoshuaPettus commented 4 years ago

I use the subsonic app from F-Droid, works great. I think the newer version on the googleplay store doesn't work.

paulijar commented 4 years ago

Sorry for the delay.

I had never managed to make the Airsonic Player work work with the Music, and I have had no idea about what is the problem. The application just seemed to do nothing when I tried to save my server settings. Now your post made me test it again, and I realized that there actually was an error message about the version number; it was just shown just outside of the visible screen area, and I had to scroll half a centimeter to see it :facepalm:.

I now did some experimenting, and returning version 1.12.0 from the server was still not enough to satisfy Air Player. However, returning 1.13.0 did the trick, and the application allowed to save the settings. At the same time, the Air Player tells in all its requests to the server that it is using the API version 1.11.0. And even that didn't quite make sense to me, because I didn't see the application use any API features which wouldn't be available already on 1.8.0. Go figure.

The next problem with the app was, that it was requesting albums list using mode alphabeticalByArtist which is not currently implemented on the Music app, as no other client has ever used it. The Air Player crashed when the Music app returned an empty album list as response for this. I made a quick hack to return all the albums on this request (but not in the actual requested order), and I got forward.

The next thing I noticed was, that for some bizarre reason, the application wants to fetch all the artists and all the albums of the library, one-by-one, before showing anything to the user. With a small test library (maybe 200 tracks), this took around a minute, and then I could use the app. But with my real life collection of 2000 tracks, the app loaded like two minutes and then crashed, and I could never make it work. I tried two or three times with the same result.

Overall, I got the impression, that Air Player is not very high quality product. And that the creator(s) of the app haven't quite figured out, how the Subsonic API is supposed to be used, for satisfactory performance and scalability. I think that you will be better off using any of the Android clients listed in https://github.com/owncloud/music/wiki/Subsonic. All of them work on https connections, and although some of them haven't been updated for a while, they all seem to work pretty decently.

paulijar commented 4 years ago

@powerlocke-ctrl The freshly released Music app v0.14.1 now fixes a couple of issues, which made the Music app incompatible with Air Player, apart from the API version number. One such fix is the added support for the album list of type alphabeticalByArtist and another is making the getPlaylists service conform the API specification by adding a few more properties to the result. Both of these used to make Air Player crash when it tried to sync the collection.

As I mentioned in the previous post, the API version must actually be at least 1.13.0 or otherwise Air Player won't allow to save your server settings. However, I didn't want to increase the API version advertised by the Music app, because we don't currently support a single feature introduced in API versions 1.11.0, 1.12.0, or 1.13.0. And clearly Air Player doesn't need these features either, so it's a silly thing to be so strict about the version.

If you still want give Air Player a try, you can rather easily change the API version yourself on this line: https://github.com/owncloud/music/blob/b191fa76d32d054790881f71547ac8f584527c71/controller/subsoniccontroller.php#L52

Air Player seems to check the version only when saving the server settings. After successfully setting up the connection, you can change the version back to what it was, and Air Player should continue working normally.

paulijar commented 4 years ago

I think this issue has been sufficiently addressed and can be closed. The API version will not be increased for now, but it will be done if we ever actually implement features introduced in the higher API versions.

paulijar commented 3 years ago

Music v1.3.1 increments the Subsonic API version to 1.13.0 and it was time to revisit Airsonic Player. Probably there has been some fixes on the Airsonic Player, too, during the past 15 months and now it seems to be a viable option at least for medium-sized music libraries (successfully tested with ~200 albums). Also performance improvements on the Music app side might have a part in the equation. Because of the player's design, it probably still isn't the best option for huge libraries with thousands of albums.