Commit Graph

5586 Commits

Author SHA1 Message Date
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