Commit Graph

7269 Commits

Author SHA1 Message Date
John Maguire 7885c61a39
Merge pull request #6310 from jbroadus/fix-unhandled-error-condition
Fix potential use of streamer element after deletion.
2019-03-20 10:10:48 +00: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
John Maguire 5171150e4f
Fix spotify blob detection on win32 2019-03-18 17:57:57 +00:00
John Maguire 106bb73aec
Merge pull request #6308 from jbroadus/issue-6302-gst-error-crash
Fix MoodbarPipeline crash on gstreamer error.
2019-03-18 14:19:49 +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
John Maguire 36cc5b82f4
Merge pull request #6283 from aliallaoui/qt5
Compile fix for qxt third party
2019-02-13 15:02:56 +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
Ali Allaoui 1176d9eb93 [qxt] No need to check qt versionat all, Qt 5.6 is required.
So just use QX11Info
2019-02-09 16:06:16 +01: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
John Maguire 610566d252
Merge pull request #6276 from jonaski/qt5-update
Update Qt 5 branch
2019-01-27 20:26:35 +00:00
Jonas Kvinge c277cc5f6c Merge remote-tracking branch 'upstream/master' into qt5-update 2019-01-27 19:44:28 +01:00
Jonas Kvinge 956df42caa Add syntax to proto files 2019-01-27 14:56:07 +00:00
Jonas Kvinge 3256e81414 Update about 2019-01-27 14:55:50 +00:00
John Maguire 627a6fe486
Merge pull request #6271 from jonaski/qt5-update
Update Qt5 branch
2019-01-27 00:31:14 +00:00
Jonas Kvinge d8788d6a0d Update qt5 branch 2019-01-27 01:00:36 +01:00
aqua36 c4d6424e96 ultimate_providers.xml: now handles colon correctly for genius.com (#6269) 2019-01-24 12:00:46 +00: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 eaac6672ab Update appdata (#6266) 2019-01-21 22:04:13 +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 d5eb07c6f0 Remove echonest (#6263) 2019-01-21 21:39:10 +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
Dmitriy Bogdanov a82cc2f8a6 Update lyrics.com lyrics provider
* Fix "not found" detection.
* Also exclude footer.
2019-01-21 09:02:58 +00:00
Ali Allaoui 85558d242c [qxt] Compil fix for qt version > 5.6 2019-01-18 16:36:52 +01:00
John Maguire f22e4acac6
Merge pull request #6257 from jonaski/qt5-update
Update Qt 5 branch
2019-01-18 03:25:13 +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
Martin Delille 6d50e0b041 Specify cpp11 compatibility Fix #6199 (#6237) 2019-01-15 17:54:08 +00:00
Jonas Kvinge 681f986f0f Fix global shortcuts using GSD D-Bus backend (#6251) 2019-01-09 04:11:28 +00:00
kz6fittycent 35386a1af8 PR for Clementine snap (#6018)
* Prepping for PR

* Security and interfaces

libssl1.0.0: 3611-1, 3628-1

desktop
desktop-legacy
wayland
2019-01-03 10:40:38 +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