A LibraryBackend may be deleted while an associated LibraryModel object is using
it. An example is an async query running while a connected device is removed.
To prevent this, use a share pointer for the LibraryBackend.
This fixes one case where LibraryBackend is used after deletion. However, the
raw pointer is still passed around in several other places. These should be
evaluated on a case-by-case basis to insure that circular depencencies aren't
introduced.
* Add option to verify subsonic server certificate.
Defaults to true, as it is safer to have a server certificate verified,
even more so, if the server is used over an insecure WAN link.
During subsonic configuration the checkbox can be deactivated, so that
no certificate verification will occur when talking to a subsonic
server, allowing for self-signed certificates.
With the proliferation of let's encrypt certificates there's probably
less need for this option but it has been requested and hard-coding
verify-off is IMHO bad security practice.
If a valid certificate has been installed, the configuration file can be
modified manually and after a restart Clementine will perform a proper
server certificate verification.
The patch might need some UI polishing and asks for string translations
but is operational so far.
* Satisfy CLang format checker.
* Use QSettings' default value support.
* Consistently use QSettings' default value method.
Qt's QUrl parser does no longer accept pure numeric hostnames without
trying to make a dotted IPv4 address of them.
Thus current method of storing subsonic's numeric ids in the host part
of a QUrl ("subsonic://<id>") does no longer work.
Instead a query is constructed omitting the host-part entirely and using
"subsonic://?id=<id>" to store and retrieve subsonic titles.
- Ampache recently added support for returning playcounts, if the client
reports that it knows it's talking to an ampache server:
1aaf01ae98
- This checks the type attribute on the ping request to see if
Clementine is talking to an Ampache server, and if so, it adds
ampache=1 to getAlbum requests, and uses the returned playcounts.
Notes:
- These playlists allow access to the subsonic feature of pulling new, frequently played, and so on albums.
- See: http://www.subsonic.org/pages/api.jsp#getAlbumList for the subsonic description
- The subsonic api is inherently album oriented. Therefore at the moment the "count" argument for GenerateMore is used as the number of albums to pull, which hopefully isn't a problem.
- Could be made more efficient by multi-threading the fetch of the songs for each album