Commit Graph

62 Commits

Author SHA1 Message Date
xoza 4768cb9efb Skip subsonic multi-genre tags 2023-10-12 12:27:43 +01:00
Marcus Müller 8e47ab59e5 internet services: consistently use 'override'
Signed-off-by: Marcus Müller <marcus_clementine@baseband.digital>
2023-09-17 12:43:13 +01:00
Jonas Kvinge daa2f25e3c Replace Q_ENUMS with Q_ENUM
Q_ENUMS is obsolete. See: https://doc.qt.io/qt-5/qobject-obsolete.html
The replacement is Q_ENUM which was introduced in Qt 5.5, and Clementine
requires Qt 5.6.
2021-07-14 10:19:28 +01:00
Jim Broadus a5e84bbe98 internet: Add common InternetService::ConfigRequired() method.
This will allow some common handling of unconfigured services.
2021-07-07 10:47:01 +01:00
Jim Broadus 6240fd3d0a player: Fix crash on UrlHandler error.
In a case where a playlist is composed entirely of unresolvable
internet service URLs and the playlist is set to repeat, playing an
item will result in an infinite (until crash) recursive condition.
HandleLoadResult is called with a NoMoreTracks result. It then calls
NextItem, which calls PlayAt for the next item, which, again, calls
HandleLoadResult.

This can be reproduced by logging into a subsonic server, adding items
to an empty playlist, then signing out.

To solve this, separate the error condition from the NoMoreTracks
result. Handle URL resolution errors the same way that media playback
errors are handled, where an error count is incremented and the player
stops if a limit is reached. The common code also notifies the playlist
of the error and provides user feedback by graying out the item.
2021-06-21 12:52:25 +01:00
Jim Broadus 5ebd6d1e6b internet/core: Move context_menu_ to base class
Every internet service class has a context_menu_ member. Moving this to
the base class will allow the consolidation of common menu functionality.
2021-03-18 11:16:14 +00:00
Joe Robinson bce55d0efc Fix cover art query for Subsonic-based Funkwhale servers 2021-02-26 11:16:55 +00:00
John Maguire 341dc7326f Reformat all C++ 2020-09-22 14:56:06 +01:00
Jim Broadus 83fc376b08 subsonic: Consolidate read song code 2020-05-14 11:01:22 +01:00
Jim Broadus ddba21a46f subsonic: Move ReadSong method to SubsonicService. 2020-05-14 11:01:22 +01:00
Jim Broadus 5efcae398e subsonic: Use correct URL query params to fetch cover 2020-05-13 22:23:40 +01:00
Sophie Tauchert ef3021dff2 Add tasks back in using ScopedTask 2020-04-12 21:03:18 +01:00
Sophie Tauchert 38a5d183c2 Cache SubsonicService in SubsonicDynamicPlaylist 2020-04-12 21:03:18 +01:00
Sophie Tauchert 69801a9e2a Print error on default dynamic playlist type 2020-04-12 21:03:18 +01:00
Sophie Tauchert af28ad31f1 Remove boost references 2020-04-12 21:03:18 +01:00
Sophie Tauchert 665f7af929 Be more forgiving when fetching albums/songs 2020-04-12 21:03:18 +01:00
Sophie Tauchert 8964c8131f Add dynamic playlist for random songs 2020-04-12 21:03:18 +01:00
Sophie Tauchert 1d582ba158 Fix songs in dynamic subsonic playlist 2020-04-09 13:49:21 +01:00
Jim Broadus a22af31e6e Add a common LibraryBackend::Init method.
Most users of LibraryBackend pass empty strings for directory and subdirectory
tables, so add a second Init method that omits those.
2020-03-24 14:10:43 +00:00
Jim Broadus 6a9276ec0a Fix LibraryModel async query crash.
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.
2020-01-14 21:47:31 -08:00
Jonas Kvinge 9519829d1f Fix formatting 2019-11-10 00:31:37 +01:00
Jonas Kvinge 0da490a5e1 Replace QString::null with QString() 2019-11-09 23:45:28 +01:00
John Maguire cb6cd7c485 Merge remote-tracking branch 'origin/master' into qt5 2019-10-04 16:51:43 +01:00
luz.paz fb93ae4b02 Fix misc. source comment typos
Typos found via `codespell`
2019-08-21 23:43:16 -04:00
Jonas Kvinge 1a2274bd2b Merge branch 'master' into qt5-update 2019-07-21 14:20:59 +02:00
Filip Gawin be827f4f7f Simplify some statements 2019-02-22 18:49:48 +01:00
Jonas Kvinge a5e8eba91c Merge remote-tracking branch 'upstream/master' into qt5-update 2018-06-29 02:38:19 +02:00
ftiede c01b7bc430 Add option to verify subsonic server certificate. (#6060)
* 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.
2018-05-23 14:23:53 +01:00
ftiede 4619a4c1ab Work around Qt's QUrl parser. (#6059)
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.
2018-05-23 14:23:21 +01:00
Chocobozzz 70f68b1926
Merge remote-tracking branch 'upstream/master' into qt5 2018-02-01 09:50:42 +01:00
Adrian Garcia dfa7042ff3 Subsonic: download cover art (#5880) 2017-10-06 14:08:00 +01:00
Chocobozzz 2096b1f268 Merge branch 'master' into qt5 2016-12-13 20:26:19 +01:00
Nicolas Martinelli 650f06f7ad Fix Subsonic endpoint
According to the documentation, the endpoint is `getAlbumList`, not
`GetAlbumList`. This typo makes the complete feature not working at
all.

Source: http://www.subsonic.org/pages/api.jsp#getAlbumList
2016-10-20 22:08:26 +02:00
Chocobozzz 0aa3405274 Merge remote-tracking branch 'upstream/master' into qt5 2016-05-09 12:46:08 +02:00
David G. F f1825629db Qt5
* Fixing a couple of issues with subsonic in the qt5 port

* Forgot to add this fixes as well, otherwise won't play music!
2016-04-19 23:22:23 +01:00
David G. F 182e5c3034 Fixing a couple of issues with subsonic in the qt5 port (#5346) 2016-04-19 21:50:21 +01:00
David Sansome 2257dcd278 Merge pull request #5318 from goggle/master
Fixed compile error for the subsonic module.
2016-03-30 10:01:07 +11:00
John Maguire b20d0d87fd Revert "Adding support for subsonic cover art download" 2016-03-29 21:12:54 +01:00
Alex Seiler 6cc60d0cf8 Fixed compile error for the subsonic module. 2016-03-29 21:23:53 +02:00
David Guillen Fandos 10bac1cd2d Fixing issues in the pull request. 2016-03-12 19:44:32 +00:00
David Guillen Fandos e4efde900a Adding support for subsonic cover art download 2016-02-26 23:29:13 +00:00
Chocobozzz ff7026c9fe Merge remote-tracking branch 'upstream/master' into qt5 2015-12-13 20:05:12 +01:00
Nick Lanham ee7c9527a0 Add ampache=1 to getAlbum for playcounts
- 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.
2015-12-08 14:15:56 -08:00
John Maguire d47ee24962 Merge pull request #5138 from nicklan/master
Add "Smart Playlists" for subsonic
2015-12-08 12:26:18 +00:00
Nick Lanham 8dc6563718 Always pass size and count parameters, init to defaults 2015-12-07 11:00:03 -08:00
Nick Lanham da537d9a4b use WaitForSignal 2015-12-03 17:25:00 -08:00
Nick Lanham 310cf001af Updates from hatstand's comments 2015-12-01 14:59:40 -08:00
narunlifescience 2603cf2088 use iconloader & cleanup previous remnants
update
2015-12-01 00:32:20 -06:00
Nick Lanham d022f974a1 Add "Smart Playlists" for subsonic
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
2015-11-30 22:13:37 -08:00
narunlifescience dd953fd86c check custom icon location, then system theme & then fallback theme
icons added & replaced
2015-10-13 22:35:49 -05:00