Open njsmith opened 4 years ago
Hmm, on further investigation, it appears that Clementine is truncating the album list sent by the server. It does multiple HTTP requests to the /rest/getAlbumList2.view?...&type=alphabeticalByName&size=500&offset=...
endpoint, to fetch the first 500 albums, then the second 500 albums, etc. It does correctly fetch all of the pages. (In my case, I have less than 1000 albums, so this requires 3 requests, where the last request returns an empty response.) But the actual albums that eventually show up in the UI are:
Ah-hah, found the issue. In the metadata that Airsonic is returning, a few of my albums have a mangled genre field, with the literal value Text=".";
:
<album id="105" name="Out Of The Blue" artist="Electric Light Orchestra" artistId="75" songCount="17" duration="4238" created="2010-08-09T00:38:12.000Z" genre="Text="."; "/>
I have no idea why the genre field was set to this weird value, but I guess it doesn't matter that much.
Clementine does not handle this gracefully at all. As soon as it sees an <album>
tag with the weird genre field, then it stops parsing the album list entirely.
I think the issue is here, in the loop Clementine uses to scan the <album>
tags:
If we look at the docs, they say that readNextStartElement
returns false "when the end element was reached, or when an error occurred" (my emphasis).
So I guess Qt's XML parser gives an error when it sees the attribute genre="Text=".";"
? That's pretty weird; it looks like valid XML syntax to me. But if you look at that function, this seems to be the only way that Clementine could abort parsing an album list early, but then continue to fetch the next page of albums.
As a workaround, I manually found the 3 offending albums inside Airsonic's web UI, and used its "Edit tags" function to set a more sensible genre. After doing this and restarting everything a few times, Clementine now appears to be able to see and play my whole library.
If it is bailing there due to an XML error, then I think there's a bug in QXmlStreamReader. I think that's still well-formed XML. Which QT5 version is 19.10 using?
Looks like it's:
Package: libqt5xml5
Version: 5.12.4+dfsg-4ubuntu1.1
I don't see anything obviously broken in their code. They do use a proprietary parser generator, so there are likely some fun corner cases. https://github.com/qt/qtbase/tree/dev/src/corelib/serialization
It might be interesting to add your failing snippet to one of their test cases and see what it does.
I have been able to confirm this happens on clementine 1.4, but not on 1.3.1
This started to happen to me again after upgrading to to the latest version of Ubuntu with Clementine v. 1.4.0~rc1+git347-gfc4cb6fc7+dfsg-2
, only one album is loading from my library.
EDIT: I tried to edit the tags of the an apparently objectionable album, and now nothing loads.
Before posting
Please follow the steps below and check the boxes with [x] once you did the step.
System information
Please provide information about your system and the version of Clementine used.
Expected behaviour / actual behaviour
I configured Clementine's Subsonic support to point to an Airsonic server running on my local network.
Expected behavior: Clementine would be able to see and play all of the albums on the Airsonic server.
Actual behavior: Clementine connects successfully, and lists and can play some of the albums, but most albums are mysteriously missing.
For example, Clementine only finds 5 artists under "A":
But in fact I have lots more than that. Here's a screenshot of the artists list from the "Ultrasonic" Android app, pointing at the exact same Airsonic server. Notice that there are way more than 5, and they can't even all fit on the screen:
AFAICT, this is happening at the album level: if an album is there, then all of its songs are there and playable. But lots of albums are missing. For example, if I expand "Ani DiFranco", then Clementine only shows 1 album by her, but there should be 4.
To double-check that the problem is really on Clementine's side, I also used wireshark to sniff the communications between Clementine and the Airsonic server, and the server is clearly informing Clementine about albums that are missing from Clementine's display: