Commit Graph

5884 Commits

Author SHA1 Message Date
Jonas Kvinge 5eb32b33c1 Replace QSet::toList() with QSet::values() 2020-01-05 00:58:33 +01:00
Jonas Kvinge ddc8a5f010 Initialize QObject in constructor and add explicit 2020-01-05 00:21:04 +01:00
Jonas Kvinge 7f6e7f8b30 Fix formatting 2020-01-05 00:17:18 +01:00
Jonas Kvinge f81a3aa8d8 Replace use of QString::sprintf with QString::asprintf 2020-01-05 00:12:32 +01:00
Jonas Kvinge a70537b83f Replace use of QStyleOptionFrameV3 2020-01-04 23:40:12 +01:00
Jonas Kvinge 39cdb7fc3f Add fallthrough comment where fallthrough is intended 2020-01-04 23:29:19 +01:00
Jonas Kvinge 4c157a95dd Replace use of QPalette::background with QPalette::window 2020-01-04 23:01:02 +01:00
Jonas Kvinge 28bbb74c26 Replace use of QColor::dark with QColor::darker 2020-01-04 23:00:40 +01:00
Jonas Kvinge 9e3461f818 Fix formatting 2020-01-04 21:24:31 +01:00
Jonas Kvinge 6a8f70285f Replace all uses of QDesktopWidget with QScreen 2020-01-04 21:18:12 +01:00
Jonas Kvinge 39934dc302 Fix songs stuck in various artists 2020-01-04 18:27:42 +01:00
Jonas Kvinge 651965b905 Fix formatting 2020-01-04 18:12:44 +01:00
Jonas Kvinge 250b5ca0a6 Remove pixmap cache and pending art when removing parent nodes instead 2020-01-04 18:07:34 +01:00
Jonas Kvinge a4a8726ddf Fix formatting 2020-01-04 17:44:07 +01:00
Jonas Kvinge 30413767cb Fix macOS filesystem listener (library watcher) 2020-01-04 17:38:55 +01:00
Jim Broadus 590d7f3823 Add an option to specify a gpodder server.
Add an "Advanced Settings" option to the gpodder sign in. If selected, a fully
qualified URL must be specified as the gpodder base. Upon successful login, the
URL is saved along with username and password. If advanced settings are not
selected, an empty URL is stored and the default will be used.
2020-01-03 22:46:15 -08:00
Clementine Buildbot eec38a64d1 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2020-01-02 17:06:49 +00:00
John Maguire e6e8090371
Merge pull request #6492 from jbroadus/fix-smartplaylist-crash
Fix smartplaylist crash
2020-01-02 17:04:11 +00:00
Jim Broadus a164a5dffa Fix smart playlist crash.
When QProxyStyle is given a base style, it take ownership of that object.
PlaylistView creates a proxy style based on its own style, but that is a shared
resource. When the PlayListView is destroyed, this object is destroyed.

Instead of passing style() to QStyle, pass nullptr. This will use the native
style.
2020-01-01 22:30:59 -08:00
Jim Broadus 963b272c4b Don't crash if smartplaylist wizard plugin is not found. 2020-01-01 22:30:56 -08:00
Jim Broadus e32ba7eac5 Gpodder login cleanup.
It's not necessary for the PodcastSettingsPage class to have knowledge of
GPodderSync's login implementation. Handling the network reply in a single
location sightly simplifies the code. It also makes the handling order
more deterministic.
2019-12-30 20:58:30 -08:00
Jim Broadus a1da067002 Reset gpodder session cookies on logout.
A sessionid cookie is stored when logging in to gpodder. After logging out, a
subsequent login with the same user name but incorrect password will succeed,
ignoring the authorization header. The incorrect password will be stored for
future use.

To fix this, reset the cookie jar for GPodderSync's network access manager at
logout.
2019-12-30 14:19:08 -08:00
John Maguire f9d4cd9f0d
Merge pull request #6485 from jbroadus/fix-gpodder-error-leak
Fix gpodder sync memory leaks in success cases.
2019-12-29 21:01:20 +00:00
Jim Broadus 36179a7197 Fix gpodder sync memory leaks in success cases.
A closure created by NewClosure that handles Qt signals is destroyed if the
signal object is destroyed, the slot object is destroyed, or the signal is
invoked. In the case where the sender is passed as a shared pointer, the
reference prevents the sender from being destroyed before the closure.

So for closures built to handle responses returned from ApiRequest in
GPodderSync, the closure object and the response object will only be destroyed
after the signal is invoked. In some cases, separate closures are built for
error signals as well. For these, only one closure will be destroyed. The other
closures and the response object will be leaked.

A simple fix for the success cases is to remove the unnecessary error case
closures and directly connect the signals to slots. This is low hanging fruit
and still leaves leaks in the error cases. Those cases will require a more
complete solution to properly manage the life cycle of the response object.
2019-12-29 10:11:29 -08:00
Clementine Buildbot 9e73aae821 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-12-29 16:40:32 +00:00
Jim Broadus 5e7e57df73 Set a 30 second timeout for gpodder requests. 2019-12-25 23:53:47 -08:00
Jim Broadus 77d5d8bdea Add a timeout option to NetworkAccessManager.
In most cases, timeouts can be applied to a reply after a request has been made.
But some APIs, such as libmygpo-qt, don't always provide access to the reply or
provide abort methods. For these cases, add an optional timeout to
NetworkAccessManager. If set, create a NetworkTimeouts instance in createRequest
and add the reply. Use the reply as the parent so that it is destroyed when the
reply is destroyed.
2019-12-25 23:53:45 -08:00
Clementine Buildbot 82b185c087 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-12-24 00:25:44 +00:00
Clementine Buildbot 90a237716a Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-12-15 11:23:45 +00:00
Thor Merlin Lervik 715da8909f Fix resuming playback position on startup 2019-12-14 17:22:16 +01:00
John Maguire 672b90659b
Merge pull request #6472 from cquike/xdg
Support  for XDG_CONFIG_HOME and XDG_CACHE_HOME
2019-12-10 18:56:41 +00:00
Cesar Enrique Garcia Dabo a7ad66d028 Fix issues reported by clang-format 2019-12-10 18:45:06 +01:00
Cesar Enrique Garcia Dabo 397145d21f Remove obsolete forced setting of XDG_CONFIG_HOME.
Apparently this was introduced in 2011 as a workaround to solve a problem in
libimobiledevice. However already in 2013 the problem was solved
in libimobiledevice:
b811fbb05b
2019-12-10 18:05:55 +01:00
John Maguire 998f12699b
Merge pull request #6470 from lacc97/kglobalaccel
Add KGlobalAccel global shortcuts backend
2019-12-10 10:14:32 +00:00
Clementine Buildbot ca2c6771fd Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-12-10 00:25:31 +00:00
Luis Caceres 7ef917008a Fix formatting again 2019-12-09 17:02:42 +00:00
Luis Caceres 344989785b Fix multiple triggers of shortcut actions
Also properly connect/disconnect from DBus signal upons register/unregister.
2019-12-09 16:58:32 +00:00
Luis Caceres 2307c15227 Fix style 2019-12-09 16:25:29 +00:00
Cesar Enrique Garcia Dabo f5ec88b529 Add support in GetConfigPath() for /pixmapcache directory 2019-12-07 23:30:14 +01:00
Cesar Enrique Garcia Dabo ab2f7c03ea Use QStandardPaths to define Path_Root and Path_CacheRoot.
These two directories use QStandardPaths::ConfigLocation and
QStandardPaths::GenericCacheLocation respectively, with the
application name (Clementine) appended. The QStandardPaths class from QT
honors the XDG standards:

https://specifications.freedesktop.org/basedir-spec/basedir-spec-0.6.html
https://doc.qt.io/qt-5/qstandardpaths.html#writableLocation
2019-12-07 23:22:13 +01:00
Luis Caceres a3531d749a Actually fix formatting 2019-12-07 19:30:10 +00:00
Luis Caceres 0b6519bad4 Fix build with DBus disabled 2019-12-06 23:56:15 +00:00
Luis Caceres 8cab8fe180 Fix formatting 2019-12-06 23:53:40 +00:00
Luis Caceres 24a571769a Initial KGlobalAccel support 2019-12-06 22:34:13 +00:00
Clementine Buildbot 440ac6dda2 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-12-03 00:25:13 +00:00
Clementine Buildbot 1e28f4e7dd Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-11-26 00:25:05 +00:00
Clementine Buildbot 23d0f3514d Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-11-18 16:20:16 +00:00
Clementine Buildbot d8c020281e Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-11-15 17:28:36 +00:00
Clementine Buildbot f71e99360b Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-11-15 12:34:01 +00:00
John Maguire 8b765a5257 Remove qtsparkle support 2019-11-14 20:53:46 +00:00
John Maguire e0b04ec378
Merge pull request #6455 from jonaski/edittagdialog
Fix edit tag dialog
2019-11-13 23:24:19 +00:00
John Maguire 142f9f26c5
Merge pull request #6454 from jonaski/albumartist
Change remaining group by defaults to album artist
2019-11-13 23:11:16 +00:00
Jonas Kvinge e985bd780a Fix edit tag dialog 2019-11-13 20:47:14 +01:00
Jonas Kvinge cdfc059cb1 Change remaining group by defaults to album artist 2019-11-13 20:20:44 +01:00
Jonas Kvinge 44c111941c Fix updating song count 2019-11-13 19:20:17 +01:00
John Maguire 21848d62d8
Merge pull request #6450 from jonaski/compilations
Fix updating compilations
2019-11-13 18:01:29 +00:00
John Maguire 74d4f9e204
Merge pull request #6449 from paperbagcorner/removefile
Remove an unused file that had been left in the qt5 branch
2019-11-13 17:05:32 +00:00
Jonas Kvinge 6accd1e3db Fix formatting 2019-11-13 17:39:29 +01:00
Jonas Kvinge 8d75f321de Fix updating compilations 2019-11-13 17:25:54 +01:00
Mattias Andersson cd3d481eda Remove an unused file that had been left in the qt5 branch 2019-11-13 09:48:34 +01:00
John Maguire 50663ddde0
Merge pull request #6448 from jonaski/librarywatcher
Remove watch for removed subdirectories
2019-11-12 19:57:16 +00:00
Clementine Buildbot 5898241190 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-11-12 19:25:52 +00:00
Jonas Kvinge ca18a5584d Fix formatting 2019-11-12 20:05:53 +01:00
Jonas Kvinge fd35f20d26 Remove watch for removed subdirectories 2019-11-12 19:55:48 +01:00
Jonas Kvinge 1b35d3f6a3 Dont clear pixmap cache on model reset 2019-11-12 19:26:52 +01:00
Jonas Kvinge 796fa285f5 Fix formatting 2019-11-12 19:16:22 +01:00
Jonas Kvinge 04baa9ec0f Remove album from pixmap cache when song is removed from library model 2019-11-12 19:08:42 +01:00
John Maguire 28f6bfd898
Merge pull request #6442 from jonaski/probequeue
Switch to queue2 for probe queue and set properties
2019-11-11 23:23:37 +00:00
Jonas Kvinge 2a2a71281a Switch to queue2 for probe queue and set properties 2019-11-11 21:26:11 +01:00
John Maguire b7c3173001
Merge pull request #6439 from jonaski/signalmapper
Replace all uses of QSignalMapper with C++11 lambda expressions
2019-11-10 19:13:31 +00:00
Jonas Kvinge 3f9b6b1192 Fix formatting 2019-11-10 15:21:08 +01:00
Jonas Kvinge 344023e6dd Fix formatting 2019-11-10 15:16:39 +01:00
Jonas Kvinge ba31c755ef Replace all uses of QSignalMapper with C++11 lambda expressions 2019-11-10 15:07:12 +01:00
John Maguire 21da802630
Merge pull request #6438 from jonaski/remove-extra-semicolon
Remove extra ';'
2019-11-10 00:53:37 +00:00
Jonas Kvinge 9519829d1f Fix formatting 2019-11-10 00:31:37 +01:00
Jonas Kvinge d09c27f719 Remove extra ';' 2019-11-10 00:30:18 +01:00
Jonas Kvinge 0da490a5e1 Replace QString::null with QString() 2019-11-09 23:45:28 +01:00
Clementine Buildbot f9627c2084 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-11-07 12:29:45 +00:00
John Maguire 04c85c2bb7
Merge pull request #6433 from clementine-player/qt5
Qt5
2019-11-07 12:27:25 +00:00
Clementine Buildbot e72bccbf0d Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-11-05 00:25:15 +00:00
Dmitry Valter 18c2b41615 Revert "Attempt to fix track change hang"
Queue2 tends to hang up on pause, unable to start playing
again. Pipeline actually stays PLAYING with ASYNC state
change, so it becomes impossible to unpause the player
without stop or forward/backward seeks.

This reverts commit 2b280de663.
2019-11-02 10:16:42 +03:00
Clementine Buildbot b3e2b4731b Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-10-29 00:25:20 +00:00
John Maguire 992311c185 Bunch of mac build fixes 2019-10-16 19:42:21 +01:00
John Maguire cb6cd7c485 Merge remote-tracking branch 'origin/master' into qt5 2019-10-04 16:51:43 +01:00
Clementine Buildbot e2bc2eee90 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-09-24 00:24:59 +00:00
Clementine Buildbot 0c7b280b95 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-09-17 00:25:04 +00:00
Antonio Russo c5c294ba14 fancytabwidget.cpp: reuse QSettings object
avoid excessive locking by reusing a common QSettings object in
loadSettings.
2019-09-10 18:41:18 -06:00
Antonio Russo e2de5cd62e fancytabwidget.cpp: prefer QString to std::string
Consistently use QString, rather than creating a std::string and
immediately casting to std::string
2019-09-10 18:41:18 -06:00
Antonio Russo ccaa59cc66 Periodically save current playlist tab
Building on the previous commit, we save the current playlist (tab)
periodically as well.

Signed-off-by: Antonio Russo <antonio.e.russo@gmail.com>
2019-09-10 18:41:18 -06:00
Antonio Russo e66fdd86da Periodically save settings
Instead of immediately saving, which leads to poor performance,
and possible hardware damage (see #6057), limit saves to once
per second (similar to how KDE does it).  It also guarantees
that only one save is required per second, by sharing a QSettings
object, and establishes a signaling framework to put other
setting save events into (but only uses this for the two major
offenders: playlist tab switching and window resizing).

This is in contrast to 6a312e7, which simply deferred the save
until program exit, and caused problems for some people (see #6217
and #6209).

Signed-off-by: Antonio Russo <antonio.e.russo@gmail.com>
2019-09-10 18:41:18 -06:00
Clementine Buildbot da6ff91241 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-09-10 00:25:00 +00:00
Clementine Buildbot 47f80d67c5 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-09-03 00:25:11 +00:00
Clementine Buildbot b423808ddf Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-08-27 00:25:09 +00:00
Clementine Buildbot 3e7be7357e Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-08-22 11:13:28 +00:00
Clementine Buildbot 773f26a42d Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-08-22 10:30:35 +00:00
luz.paz fb93ae4b02 Fix misc. source comment typos
Typos found via `codespell`
2019-08-21 23:43:16 -04:00
Jonas Kvinge 546078c317 Fix memory leaks (#6376) 2019-08-02 16:24:26 +01:00
Jonas Kvinge 8d921c15be Fix memory leaks in database 2019-07-25 19:02:43 +02:00
John Maguire 75f18dab23
Merge pull request #6374 from jonaski/qt5-update
Qt5 update
2019-07-24 11:51:48 +01:00
John Maguire 3694bcfc82
Merge pull request #6371 from areading/limit_tagclient_procs
Introduce limit for number of tag client processes.
2019-07-22 10:56:03 +01:00
Andrew Reading c76697b42c Introduce limit for number of tag client processes.
Previously, the number of processes spawned was always
QThread::idealThreadCount() (returning the number of logical CPU
cores). On new systems with many cores, however, this can result
in 12, 16, 24, or ... processes being spawned, which is a bit
excessive.

This establishes a new config variable,
'max_numprocs_tagclients' within the Settings group, in order
to limit the maximum number of tag client processes that get
spawned. It also adds a means of setting this via the Behavior
page in Settings. It can be set to any integer in the interval
[1, QThread::idealThreadCount()]; it defaults to the maximal value
so as to emulate the old behavior.
2019-07-21 10:53:13 -07:00
Jonas Kvinge 66fdc935ac Fix formatting 2019-07-21 14:38:15 +02:00
Jonas Kvinge 1a2274bd2b Merge branch 'master' into qt5-update 2019-07-21 14:20:59 +02:00
Clementine Buildbot a2dcb33d84 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-07-20 17:55:03 +00:00
lordlethis c9800a4dc9 Fix blank window when restoring from systray (#6351)
* Fix blank window when restoring from systray

This applies the fix qBittorrent used for this same issue:
https://github.com/qbittorrent/qBittorrent/issues/9240,
so credit goes to those guys

* Fix whitespace
2019-07-13 12:57:27 +01:00
Clementine Buildbot da0447142b Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-07-09 00:25:09 +00:00
Clementine Buildbot a0e4785346 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-07-02 00:25:09 +00:00
Paul Bonnen b697e962b3 Make D-Bus 'desktop-entry' hint match system filename.
"Clementine" (as returned by QCoreApplication::applicationName())
does not match the system .desktop file name (but it may match user
.desktop files, as was the case for me); Clementine won't be picked up
as an application in KDE Plasma notification settings unless it case
matches.
2019-06-16 13:03:47 -04:00
Paul Bonnen 8483d24a04 Add `desktop-entry' hint to D-Bus notifications.
The notification system in KDE Plasma 5.16+ requires a 'desktop-entry'
hint in the D-Bus message to enable per-application notification
settings.
2019-06-16 12:37:53 -04:00
Jonas Kvinge 9e85eb2c0f
Fix gst_buffer_unref assertion in chromaprinter 2019-06-09 10:29:41 +01:00
Clementine Buildbot c1af92d24d Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-06-04 00:24:56 +00:00
Clementine Buildbot 4ed4eec817 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-05-21 00:25:05 +00:00
Clementine Buildbot ebdaaaf714 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-05-14 00:25:05 +00:00
Clementine Buildbot d3e79436af Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-05-07 00:25:10 +00:00
Clementine Buildbot 44ac3936ea Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-04-30 00:25:05 +00:00
Clementine Buildbot 013ee87177 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-04-27 16:41:30 +00:00
Jonas Kvinge 8094957e09 Fix gst_buffer_unref assertion in chromaprinter 2019-04-26 20:40:42 +02:00
Clementine Buildbot d079f00cfe Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-04-23 00:25:03 +00:00
Antonio Russo 40326bb94b setFirstSectionMovable() in playlistview.cpp
Qt 5.11 added a function allowing the first column in a list to be set
to be movable.  Contingent on its availability, make the first column
of the playlist viewer draggable.
2019-04-22 17:31:16 -04:00
Antonio Russo 783dada13e Revert "Blacklist all NVidia drivers"
In 2011, there was a bug that caused NVIDIA drivers to hang
Clementine on shutdown. In 2012, only some drivers had the
fix for this issue. Now, in 2019, we do not need to work
around this bug. By reverting commit

c2723008a2

we work around known bad drivers, but do not penalize all
NVIDIA users for this ancient bug.
2019-04-21 09:11:33 -04:00
Clementine Buildbot b11316ff03 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-04-16 00:25:05 +00:00
Clementine Buildbot 7c5a050ab8 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-04-13 18:32:41 +00:00
John Maguire 40400e850d
Merge pull request #6323 from jbroadus/async-load-errors
Add error handling path for async song loading.
2019-04-13 19:30:24 +01:00
Clementine Buildbot 4630032565 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-04-12 10:12:55 +00:00
Jim Broadus babff78025 Add error handling path for async song loading.
Async song loading can fail without user feedback. This change adds return codes
to these async load functions. It will now produce an error dialog in simple
scenarios (test case is user selecting a file that is not readable). Other cases,
such as directories and playlists, aren't yet covered.
2019-04-10 11:49:09 -07:00
John Maguire 17d95b7833
Merge pull request #6286 from smithjd15/apeFiles
More bits for APE files (Finish APE file support)
2019-04-10 11:13:51 +01:00
John Maguire e3609b27cd
Merge pull request #6296 from ShFil119/impr/simplify
Simplify some statements
2019-04-10 11:12:09 +01:00
John Maguire 878b366bfb
Merge pull request #6324 from jbroadus/set-min-fade-time
Set non-zero minimum for fade times.
2019-04-10 11:10:47 +01:00
Clementine Buildbot 641ab64ccc Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-04-09 00:25:03 +00:00
Jim Broadus cc295a4c4c Set non-zero minimum for fade times.
QTimeLine duration must be greater than 0. If set to 0, a default of 1000ms will
be used. To avoid this, enforce a minimum of 1ms for pause and cross fade values
if those fades are enabled.
2019-04-07 21:31:30 -07:00
James D. Smith bd89a1d2de Fixes for APE filetype. 2019-04-01 22:56:50 -06:00
Clementine Buildbot f6ba37dbc5 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-04-02 00:25:06 +00:00
John Maguire d8e0e7e67e
Merge pull request #6314 from jbroadus/fix-gobject-leak
Fix several gstreamer object leaks.
2019-03-26 09:51:06 +00:00
Jim Broadus 5c2ceb3490 Fix several gstreamer object leaks.
There are a number of cases where gst_pipeline_get_bus,
gst_element_get_static_pad, and g_object_get are called without releasing
references. In addition to memory usage, some of these elements hold file
descriptors. In normal operation, two file descriptors are leaked for each
played track. The default fd ulimit for many linux distros is 1024. This
is likely the cause of the crash reported in issue 6309.

This change fixes the obvious and consistent leaks, but it's probably not a
complete solution. There are many error and corner conditions that need to be
examined.
2019-03-25 23:22:09 -07:00
Clementine Buildbot 485f187e64 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-03-26 00:25:04 +00:00
Jim Broadus ca8db288d5 Free decoder bin if error occurs during setup.
In the case that an error occurs in ReplaceDecodeBin before the bin is added to
the pipeline, unreference the object to allow cleanup. This change also separates
CreateDecodeBinFromUrl from ReplaceDecodeBin, following the pattern of
CreateDecodeBinFromString.
2019-03-23 22:33:17 -07:00
Jim Broadus 102c529f80 Fix potential use of streamer element after deletion.
If ReplaceDecodeBin fails from TransitionToNext, uridecodebin_ will not be
replaced with a new element. Since TransitionToNext does not check the return
value, it unknowingly deletes uridecodebin_.
2019-03-19 18:47:19 -07:00
Clementine Buildbot 50e1158106 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-03-19 00:24:57 +00:00
Jim Broadus 55edcf5321 Fix MoodbarPipeline crash on gstreamer error.
As reported in issue 6302, playing a stream that causes gstreamer to error at
start can cause a crash. The problem occurs when the MoodbarPipeline receives a
pad-added signal after it has handled an error callback. In the error callback,
the builder_ is freed. In the pad-added handler (NewPadCallback), this object
is accessed.

This change adds a running_ flag that is set when the pipeline is started and
cleared on an error, end of stream, or object destruction. We check this flag at
the beginning of NewPadCallback. For sanity sake, we also check the builder_
pointer before dereferencing. Note that checking the state of the pipeline
wasn't an option since the pipeline is in the process of changing states during
the pad-added callback and gst_element_get_state wants to block during a state
change.

This solution is not complete as there are still some syncronization issues.
With this specific situation, the error and new pad callbacks appear to always
occur on the same thread, but that's probably not true for all error conditions.
The object is also destroyed by a different thread, so it may be possible that a
callback can occur at the wrong time during or after the deletion of the object.

See https://github.com/clementine-player/Clementine/issues/6302
2019-03-17 22:26:01 -07:00
Clementine Buildbot bcc8c6258b Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-03-12 00:25:03 +00:00
Clementine Buildbot f41b7bd893 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-03-05 00:25:19 +00:00
John Maguire efdd65b8f9
Merge pull request #6299 from jbroadus/fix-threading-issues
Fix threading issues
2019-03-03 16:22:39 +00:00
Clementine Buildbot abab640797 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-02-26 00:25:07 +00:00
Jim Broadus d041da18cc Handle case where a lister adds a device before loaded from database.
There is a small chance that a device lister is able to discover and add a
previously known device before it is added by the database loader thread.
In this case, copy the data that is user-settable to the existing DeviceInfo
object and destroy the object created from the database query.

This adds and utilizes a new FindEquivalentDevice method that compares the
device unique IDs. This could probably be made more robust as the unique
IDs for some listers may change. However, this is a problem with the database
storage implementation in general.
2019-02-24 00:05:18 -08:00
Jim Broadus a62062127e Fix thread-safety issues when initially loading devices from the database.
When DeviceManager initializes, it creates a thread to load device information
from the database. Part of this process includes use of QPixMap for icons which
produced a warning message:

22:32:53.763 WARN  unknown                          QPixmap: It is not safe to use pixmaps outside the GUI thread

In addition, the device is added to the view using beginInsertRows and
endInsertRows. This could contend with a device added by a lister signaling
PhysicalDeviceAdded.

To solve these problems, this change moves the icon loading and insertion to the
main thread. LoadAllDevices reads the data from the database and creates the
DeviceInfo object, then sends a signal to the main thread. In the signal
handler, the icon is loaded and the device is added to the master list and view.
2019-02-24 00:03:45 -08:00
Filip Gawin be827f4f7f Simplify some statements 2019-02-22 18:49:48 +01:00
Jim Broadus 248f1d8596 Prevent UI hang during device scan. (#6291)
When unmounting a device, the ConnectedDevice object is destroyed. The
FileSystemDevice destructor waits on its worker thread. If a scan is in
progress, this will block until completion.

There is an existing Stop method in the LibraryWatcher class that is intended to
stop long running operations. To fix, or at least significantly shorten this
hang, we'll call this before waiting for the thread to exit. Also add a
stop_requested check in the cover art scan.

In addition, add a call to Stop in the Library destructor, which has a similar
usage.
2019-02-20 19:03:44 +11:00
Clementine Buildbot 925773f15c Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-02-19 00:25:11 +00:00
smithjd15 8dd5750efa Improved support for APEv2 tags. (#6280) 2019-02-14 17:37:44 +11:00
Clementine Buildbot 703d592df6 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-02-12 00:25:10 +00:00
Clementine Buildbot 10d8732457 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-02-05 00:25:10 +00:00
Clementine Buildbot 9282c2c059 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-01-29 00:25:00 +00:00
Jonas Kvinge c277cc5f6c Merge remote-tracking branch 'upstream/master' into qt5-update 2019-01-27 19:44:28 +01:00
Jonas Kvinge 3256e81414 Update about 2019-01-27 14:55:50 +00:00
Jonas Kvinge d8788d6a0d Update qt5 branch 2019-01-27 01:00:36 +01:00
Clementine Buildbot df38e78b28 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-01-22 00:24:48 +00:00
Jonas Kvinge 0e52bd9d63 Remove amazon cover provider (#6265) 2019-01-21 22:04:50 +00:00
Jonas Kvinge 7f9cff03b1 Change default group by in library to album artist (#6264) 2019-01-21 21:39:39 +00:00
Jonas Kvinge ed3d462674 Fix memory leak and use ItemToIndex / IndexToItem (#6262) 2019-01-21 21:38:46 +00:00
Jonas Kvinge 7e25a7c7e4 Convert devices manager(model) to QAbstractItemModel (#6260) 2019-01-21 09:06:48 +00:00
Jonas Kvinge d772c8078d Fix formatting 2019-01-18 01:49:17 +01:00
Jonas Kvinge 89f40ee88f Use QUrlQuery 2019-01-18 01:47:26 +01:00
Jonas Kvinge 1d17bee44a Merge with master and fix conflicts 2019-01-18 01:38:12 +01:00
Jim Broadus 6c159481ed Handle MTP connection failures more gracefully. (#6256)
Currently, the failure to connect to an MTP device results in the UI displaying
an open device that appears empty. This change introduces a method
ConnectedDevice::ConnectAsync() that is expected to handle any connecting tasks
that could block asynchronously. Upon completion, this emits a ConnectFinished
signal that indicates success or failure. The row in the UI is only updated
after the successful response is received. Upon failure, DeviceManager will
clean up and the row in UI is left in the pre-connect state.

Currently, only the MtpDevice utilizes this mechanism. All other devices use a
default implementation that immediately reports success.
2019-01-15 21:10:05 +00:00
Jonas Kvinge 8d78dae9b6 Quit thread before deleting the loader (#6254) 2019-01-15 17:57:00 +00:00
Jonas Kvinge 681f986f0f Fix global shortcuts using GSD D-Bus backend (#6251) 2019-01-09 04:11:28 +00:00
Jim Broadus 74fa386c90 Try to obtain USB bus and device number from device name if unavailable in URI. (#6243)
In 1.37.2, gvfs switched to URIs that remain consistent across USB device
re-enumerations. This removed the usb bus and device numbers from the URI. In
the case that these values aren't found in the URI, try to parse Unix device
name property and pass results as query params on the URL. Pay attention to
these params in MtpConnection.

See gvfs commits 3a7bb06b and efc76d0c for reference.
2019-01-02 15:06:22 +00:00
Andreas Sturmlechner 4ff370ce1e Fix build without Qt5DBus (#6187)
* Qt5::Test is not required in the global QT_LIBRARIES definition

* Qt5::DBus had already been optional, drop bogus pkgconfig search

This partially reverts commit 4321ecf7d2.

* Find X11 only once, in root CMakeLists.txt

Since we have HAVE_X11, use HAVE_X11 in cmake.
2019-01-02 15:03:24 +00:00
Jonas Kvinge 09538d84f2 Fix Qt 5 build (#6246) 2019-01-02 15:02:34 +00:00
Clementine Buildbot 544a1d1eff Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2019-01-01 00:25:03 +00:00
Clementine Buildbot 3c8a558e7e Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2018-12-11 00:25:06 +00:00
John Maguire 453270c8b5 Fixes for compiling against qt5 on mac 2018-12-05 18:16:34 +01:00
Clementine Buildbot d853f3bfa5 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2018-12-04 00:24:56 +00:00
Jonas Kvinge 1f87535c2f Replace sha2 with QCryptographicHash (#6230) 2018-12-03 00:45:20 +00:00
Jim Broadus 95187ed0a1 Fix encoding of GError messages when logging. (#6228)
GError messages contain non-ascii characters. This normally just produces some garbage when we use the default QString contructor that assumes ASCII for logging. However, when a message includes the right double quote, UTF-8 sequence 0xE2 0x80 0x9D, the final byte is OSC. VT100 expects a command sequence to follow and stops echoing output until it sees ST or BEL character, which may never come. Thus, the console output is halted.

This change uses QString::fromLocal8Bit instead of depending on the default constructor. About half of the sites in the codebase had already been converted.

One side effect is that log messages are quoted. There are additional options to control this, but those were only introduced in Qt 5.4.
2018-12-02 09:51:19 +00:00
Jonas Kvinge 16bdd39c03 Merge remote-tracking branch 'upstream/master' into qt5-update 2018-11-29 23:21:54 +01:00
Jonas Kvinge 2d1f6cd239 Replace Q_OS_MACOS with Q_OS_MAC (#6223) 2018-11-29 22:11:55 +00:00
Jonas Kvinge d260c8b6d8 Fix saving playlist columns (#6222) 2018-11-29 21:33:52 +00:00
Jonas Kvinge 9f946a2898 Improvements to makefiles and make components optional (#6221) 2018-11-29 21:32:12 +00:00
Mattias Andersson 587e72b8c3 Fix library search queries on fts columns (#6219)
This fixes a regression introduced in 8818ba340a.
2018-11-29 14:36:01 +00:00
Jonas Kvinge 289ea31f8c Fix saving geometry and fancytab settings (#6217) 2018-11-28 20:08:23 +00:00
Jim Broadus 122d28eab9 Fix device loader error messages. (#6215)
GPodLoader and MtpLoader Error signals were connected to Error signals in their repective device classes, but the actual signal definition in ConnectedDevice was removed in a refactor several years ago. This change adds LoaderError slots to these device classes and reports the error in the manner of the refactored code.
2018-11-28 10:23:31 +00:00
Clementine Buildbot c6cb7333a6 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2018-11-27 00:24:54 +00:00
Alex Kong 0b54e1ff0b Updated accessibility check logic to fix Mojave crash 2018-11-24 18:36:34 +00:00
Jonas Kvinge 647279a000 Move spotifyimages out of spotify support 2018-11-21 10:31:17 +00:00
Jonas Kvinge 1d5783b846 Fix formatting 2018-11-21 10:31:17 +00:00
Jonas Kvinge 8c198a99a5 Qt 5 fixes 2018-11-21 10:31:17 +00:00
Clementine Buildbot 3bc6f70590 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2018-11-20 00:25:07 +00:00
Jim Broadus 5a1a5a9d95 Display podcast episode information. (#6203)
* Display podcast episode information.
Add an EpisodeInfoWidget with title, author, duration, date, and description fields. Include this in the PodcastInfoDialog. If exactly one episode is selected, then show both the podcast and episode widgets and display the episode's URL. Otherwise, hide the episode widget and follow the existing behavior. Note that the desription field for the EpisodeInfoWidget uses the QLabel and does not currently download embedded images.
Add an always_show_hours option to the PrettyTime methods to include hours in formatting even if the field is zero. This is less ambiguious in some cases where duration is displayed.

* Apply patch from automated formatter test.
2018-11-17 13:29:16 +00:00
Jim Broadus d8bab5a49f Fix memory leak in PodcastInfoWidget. (#6202) 2018-11-13 08:09:15 +00:00
Clementine Buildbot a97401cac4 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2018-11-13 00:25:13 +00:00
Jonas Kvinge d4fab4a2ea Merge remote-tracking branch 'upstream/master' into qt5-update 2018-11-11 22:46:07 +01:00
Jim Broadus 2e4814eb36 Create a PodcastInfoDialog that utilizes the existing PodcastInfoWidget. Add a Podcast Information menu item that is enabled when exactly one podcast is represented by the highlighted items. (#6190) 2018-11-11 20:53:06 +00:00
Jonas Kvinge 0104763009 Fix missing signal (#6195)
* Fix missing signal

* Fix formatting
2018-11-11 16:48:09 +00:00
Jonas Kvinge 80c7235085 Fix no music image (#6194) 2018-11-11 16:17:19 +00:00
Jonas Kvinge 9709ce0896 Fix crash in analyzer (#6193) 2018-11-11 16:15:30 +00:00
Jonas Kvinge 24c428dbae Add missing Player::Stop() (#6192) 2018-11-11 16:14:59 +00:00
Clementine Buildbot 4217e130cd Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2018-11-06 00:24:53 +00:00
Clementine Buildbot 6ba002e4a1 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2018-10-30 00:25:11 +00:00
Clementine Buildbot fbfd35272d Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2018-10-23 00:24:59 +00:00
eclipseo 623a536812 Use qt5 version of system-wide libraries (#6181) 2018-10-22 16:44:59 +01:00
Victor Parmar f4d84bc05a Split last.fm scrobbling and play count calculation, closes #5771 (#6179)
Also add a configurable option to increment the play count if song has played for a shorter duration.
2018-10-20 12:57:49 +01:00
Clementine Buildbot 9eb92ee2b5 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2018-10-16 00:24:51 +00:00
Amish Naidu 107e945872 Convert uses of QtAlgorithms to std:: algorithms 2018-10-09 19:17:54 +01:00
Clementine Buildbot 1504d8be1c Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2018-10-09 00:24:39 +00:00
Amish Naidu 34e007f2b8 Port 'Allow ignoring prefixes when sorting playlist' to master (#6166)
* Allow ignoring prefixes when sorting playlist

This introduces new configuration options which allow you to ignore
prefixes while sorting the playlist on album, artist and titles.
Prefixes are configurable, default are "a" and "the".

* Change QStringLiteral to QString for compatbility with Qt 4.8
2018-10-08 16:24:36 +01:00
Amish Naidu fb00835468 Allow ignoring prefixes when sorting playlist
This introduces new configuration options which allow you to ignore
prefixes while sorting the playlist on album, artist and titles.
Prefixes are configurable, default are "a" and "the".
2018-10-05 10:56:49 +01:00
Clementine Buildbot bea1816a15 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2018-10-02 00:24:38 +00:00
Jonas Kvinge 159d3c6ba6 Merge remote-tracking branch 'upstream/master' into qt5-update 2018-10-01 22:54:05 +02:00
John Maguire 5511583966 Remove SoundCloud support
Closes #5766, closes #5538, closes #6114, closes #5914
2018-10-01 17:46:24 +01:00
Jonas Kvinge 25ef0ff211 Only use system tray if it's available on the system (#6154) 2018-10-01 01:40:31 -07:00
Jonas Kvinge 6432a9c399 Make systray settings available only if there is a systray on the system (#6153) 2018-10-01 01:39:37 -07:00
Jonas Kvinge c29c2e95cc Fixed merge conflicts 2018-09-30 15:11:06 +02:00
John Maguire 97eadbd441 Add error handling for FTS3 tokenizer 2018-09-29 23:30:37 +01:00
John Maguire 5e8dcd668c Merge branch 'fix-sqlite' of https://github.com/Fat-Zer/Clementine into fix-sqlite 2018-09-29 23:07:30 +01:00
Clementine Buildbot 5e0caa512a Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2018-09-25 00:24:43 +00:00
Clementine Buildbot d97c19dac8 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2018-09-18 00:24:37 +00:00
Clementine Buildbot a73d67aae4 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2018-09-17 14:33:04 +00:00
Clementine Buildbot 31a9b452fb Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2018-09-17 14:03:05 +00:00
Ilgiz Mustafin a65dabcf0a Date columns for use in library search queries. (#6135)
* Mention numeric columns in tooltip

* Add date filters in search queries

* Show filter usage in tooltip

* Fix code formatting
2018-09-08 13:18:44 -07:00
Ilgiz Mustafin 68d473cfb1 Add filetype filter in search queries 2018-09-05 01:44:40 -07:00
Ilgiz Mustafin 8818ba340a More columns for use in library search queries
Support more columns for the COLUMN:VALUE syntax
in the library search query
2018-09-05 01:44:40 -07:00
Eoin O'Neill 8902776b32 SPC playback fix to prevent end-of-track signal hang.
This fixes an issue with SPC playback where tracks would not properly register End-of-track
notifications when a new track begins.
2018-09-03 01:17:51 -07:00
Alexander Kernozhitsky a71694f61b Emitting CanPlay and CanPause on change
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=898998 for more
information.
2018-08-24 05:59:33 -07:00
Kerem Seyhan 4ac2dedefa Added mouse forward and back button actions. 2018-08-14 17:09:55 +01:00
David Guillen Fandos 4a1236f8da Reduce some CPU load by disabling/fixing some UI stuff
- Disabling playlist row glow by default
 - Track slider popup visible by default, add hide()
    to ensure not visible by default (no more repaints)
 - Set kTrackSliderUpdateTimeMs to 500. IMO 40 is too low

This should partially fix issue #1079
2018-08-08 22:39:54 +01:00
Mark Furneaux 2b280de663 Attempt to fix track change hang
When switching between tracks with different sample rates, the probe queue blocks before the pipeline can emit EOS.
This prevents the track change from proceeding without manual intervention. This appears to be because the queue
element doesn't handle the rate change correctly (either due to buffer length, or cap negotiation).
The queue2 element however does handle this without blocking indefinitely.
2018-07-09 12:05:48 +01:00
Mattias Andersson e9a4db0192 Prevent closing of the RipCDDialog if the ripper is running
This prevents a segfault when a running dialog is closed and later reopened.
2018-07-07 10:23:49 +01:00
Mattias Andersson 10d4c502fd Set the parent to avoid a memory leak 2018-07-06 17:09:21 +01:00
Mattias Andersson 3e53e23bb8 Fix formatting 2018-07-06 17:09:21 +01:00
Mattias Andersson 2c084e45b6 Finnish immideately if there are no tracks to rip 2018-07-06 17:09:21 +01:00
Mattias Andersson 059b5ed04f Add Musicbrainz integration to the cd ripper 2018-07-06 17:09:21 +01:00
Mattias Andersson 84f1b7bae0 Load the audio cd in a separate thread 2018-07-06 17:09:21 +01:00
Mattias Andersson 4458d45200 Give the cd device some more time to spin up 2018-07-06 17:09:21 +01:00
Jonas Kvinge b897651cdb Device fixes for MacOs (#6098)
* Fix setting device for newer MacOs

* Fix setting device if there is an empty description
2018-07-06 10:04:40 +01:00
Jonas Kvinge a5e8eba91c Merge remote-tracking branch 'upstream/master' into qt5-update 2018-06-29 02:38:19 +02:00
Eoin O'Neill 4733185d08 Added basic VGM format playback and tag reading. (#6089)
Current VGM format implementation in GStreamer (gstgme) only supports Sega Geneses (Mega Drive) and Sega Master System emulation.
GStreamer also cannot handle the VGZ format (a shorthand for vgm.gz, a gzipped archive that contains a song) which means
that users will currently have to extract the contents of their VGZ files to individual vgm files.
2018-06-18 14:26:11 +01:00
vaterlangen fcf96cb6ff Queue size and duration is now displayed in queue manager && Album Cover Popup fixes (#6086) 2018-06-18 14:21:44 +01:00
Eoin O'Neill e2f63e3945 Implemented SPC playback functionality.
Would like to add more playback support for additional GME supported file types. GME is already supported by the GStreamer backend.
2018-06-16 10:06:37 +01:00
Jonas Kvinge a397871123 Fix loading output/device setting 2018-06-14 21:39:16 +01:00
Jonas Kvinge 5dbdcca54f Set empty string for sinks with default devices and auto sink 2018-06-14 21:39:16 +01:00
Clang Formatter 083129f41c Automatically formatted 2018-06-13 20:37:13 +00:00
vaterlangen 465fa2ce87 Clicking on songs in playlists via remote control now respecting behavioural settings from GUI (either direct changes it or enques it) 2018-06-13 22:03:23 +02:00
Jonas Kvinge f3aab34d3a Add ALSA Device Finder (#6079) 2018-06-13 09:56:42 +01:00
Jonas Kvinge da648fd08f Fix setting device on windows (#6081) 2018-06-12 09:27:10 +01:00
John Maguire 1b4955cc4a
Merge pull request #6076 from jonaski/taglib
Audio file detection by content supported by newer taglib
2018-06-10 00:04:07 +01:00
Jonas Kvinge 925e74f909 Fix crash when uridecodebin fails. (#6077)
Let's the user see the error message what failed instead of Clementine crashing.

Also don't do gst_object_unref unless bin is set.
This fixes GStreamer-CRITICAL gst_object_unref: assertion 'object != NULL' failed
2018-06-06 23:53:25 +01:00
Jonas Kvinge e0d2d9b424 Use taglib to check for valid audio file 2018-06-06 22:54:48 +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