Commit Graph

6193 Commits

Author SHA1 Message Date
Clementine Buildbot cac606186a Automatic merge of translations from Transifex 2020-10-31 02:27:33 +00:00
Jim Broadus fc4cb6fc7a Fix opml import crash
The opml parsing code handles cases where there are extra levels in the xml file
by copying the child to the main container. This corrupts the source instance
during the copy, which leads to corruption in the destination, and ultimately a
crash when it is later used.

To fix, do the copy in two steps, copying the child container to a temporary
location before copying to the destination.
2020-10-17 09:12:22 +01:00
Clementine Buildbot 4e3e9c8d14 Automatic merge of translations from Transifex 2020-10-12 02:34:09 +00:00
Clementine Buildbot 9e8d4434a0 Automatic merge of translations from Transifex 2020-10-04 02:31:34 +00:00
Clementine Buildbot b49afcc5b7 Automatic merge of translations from Transifex 2020-09-24 02:30:41 +00:00
Zanny 2bac3626c5
Fix logout cancelling (#6796) 2020-09-23 10:39:59 +01:00
Clementine Buildbot 54f7637ad2 Automatic merge of translations from Transifex 2020-09-23 02:29:48 +00:00
John Maguire 2172732b1e Include windows.h first as it's special 2020-09-22 14:56:06 +01:00
John Maguire 341dc7326f Reformat all C++ 2020-09-22 14:56:06 +01:00
Clementine Buildbot 8ae194c4a7 Automatic merge of translations from Transifex 2020-09-20 02:29:18 +00:00
Clementine Buildbot f7bece3b83 Automatic merge of translations from Transifex 2020-09-13 02:28:52 +00:00
Clementine Buildbot e9b62fa343 Automatic merge of translations from Transifex 2020-09-11 02:28:40 +00:00
Clementine Buildbot 7b3a0f397b Automatic merge of translations from Transifex 2020-09-09 02:29:06 +00:00
Clementine Buildbot d0bf92f064 Automatic merge of translations from Transifex 2020-09-06 02:28:36 +00:00
Clementine Buildbot 598f840078 Automatic merge of translations from Transifex 2020-09-03 02:28:37 +00:00
Clementine Buildbot 06855ea6c8 Automatic merge of translations from Transifex 2020-09-02 02:28:14 +00:00
Clementine Buildbot 29aad2ae3d Automatic merge of translations from Transifex 2020-08-29 02:27:36 +00:00
Gerion Entrup 6821f6d7bd udisks2lister: enable ipod recognition
The extends two functions:
- Recognize iPods as iPods, check for them in MakeDeviceUrls
- Give them a nice Icon in DeviceIcons (code taken from devicekitlister)
2020-08-28 16:48:13 +01:00
Clementine Buildbot 2d280734aa Automatic merge of translations from Transifex 2020-08-27 02:27:20 +00:00
dmdmdm 3a4d7f3a3d
Only enable main window rate button when LastFM is disabled (#6778) 2020-08-26 16:06:13 +01:00
Clementine Buildbot d3e3270227 Automatic merge of translations from Transifex 2020-08-26 02:27:24 +00:00
dmdmdm 44af6f9d5d Replaced the heart icon with a star for local files 2020-08-25 21:51:03 +01:00
dmdmdm c60c523185 Replaced the heart icon with a star for local files 2020-08-25 21:51:03 +01:00
Clementine Buildbot 6a078f93a3 Automatic merge of translations from Transifex 2020-08-21 02:27:21 +00:00
Clementine Buildbot fe33912886 Automatic merge of translations from Transifex 2020-08-19 02:27:16 +00:00
Clementine Buildbot 2a85d2c600 Automatic merge of translations from Transifex 2020-08-18 02:27:43 +00:00
Clementine Buildbot 70c79bd462 Automatic merge of translations from Transifex 2020-08-15 02:27:47 +00:00
Clementine Buildbot 8aa49902bd Automatic merge of translations from Transifex 2020-08-10 02:27:42 +00:00
Clementine Buildbot e932d421f7 Automatic merge of translations from Transifex 2020-08-04 02:27:34 +00:00
Clementine Buildbot 0e7cb988a7 Automatic merge of translations from Transifex 2020-08-03 02:27:25 +00:00
Clementine Buildbot b10222145e Automatic merge of translations from Transifex 2020-08-02 02:28:29 +00:00
Clementine Buildbot 222e142ad7 Automatic merge of translations from Transifex 2020-08-01 02:29:33 +00:00
Clementine Buildbot 2d3e2254f8 Automatic merge of translations from Transifex 2020-07-31 02:28:34 +00:00
dmdmdm d9fa56c179 Share the love: Minor corrections 2020-07-30 18:24:58 +01:00
dmdmdm acb75a5099 Share the love 2020-07-30 18:24:58 +01:00
dmdmdm 75264f314d Share the love 2020-07-30 18:24:58 +01:00
Keshav Kini 68d375c43c Use effective album artist for Repeat Album logic
When there is album artist information available for a track, the user would
probably expect that "Repeat Album" should cycle through all songs with the same
album artist and album title, not only all songs with the same artist and album
title.
2020-07-20 10:45:49 +01:00
Clementine Buildbot ee72793b5f Automatic merge of translations from Transifex 2020-07-17 02:29:12 +00:00
Jim Broadus 987fe047c6 Fix access past end of vector in getPsychedelicColor 2020-07-13 15:07:02 +01:00
Jim Broadus 1f7607b1db Get backend from application in PlaylistContainer::SetApplication
The manager's library backend may not be set when this is called.
2020-07-12 09:44:47 +01:00
Clementine Buildbot dd9ed23345 Automatic merge of translations from Transifex 2020-07-11 02:27:49 +00:00
Jim Broadus c75fa0077e Fix playlist memory leak
When the current playlist is changed, PlaylistContainer::SetViewModel is called
to set the new list. This calls PlaylistView::SetItemDelegates, which allocates
several objects that are never freed. Instead, move the call to SetItemDelegates
to PlaylistContainer::SetApplication, which is only called once.
2020-07-10 10:28:19 +01:00
Clementine Buildbot 3bfaf3ff38 Automatic merge of translations from Transifex 2020-07-09 02:28:42 +00:00
Mattias Andersson ebf9ebf080 Show only a basic tooltip in the system tray
For environments that implements the D-Bus
http://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/StatusNotifierItem
specification HTML is not supported in the tool tip title. (It is
supported in the tool tip subtitle but this field is not set by
QSystemTrayIcon.)

See the discussion in #6733 for more info.
2020-07-08 17:24:42 +01:00
Jim Broadus 7d28e8700b Call SettingsPage::showEvent from child class implementations 2020-07-07 10:35:02 +01:00
Clementine Buildbot 0fcb1df200 Automatic merge of translations from Transifex 2020-06-28 02:29:27 +00:00
Jim Broadus ad882cc999 Add static IsTypeSupported methods to playlist item classes 2020-06-23 11:06:06 +01:00
Jim Broadus 9455a3ef79 Use IsLocalLibraryItem instead of comparing type string 2020-06-23 11:06:06 +01:00
Clementine Buildbot cf279e6f48 Automatic merge of translations from Transifex 2020-06-21 02:27:27 +00:00
Jim Broadus 76a24a0a28 Use DbPlaylistItem base class for Jamendo and Magnatune
Moving these from LibraryPlaylistItem removes local file specific
implementations of IsLocalLibraryItem and Reload. Returning true for
IsLocalLibraryItem caused ratings to be set on unrelated library songs.
2020-06-19 11:18:32 +01:00
Jim Broadus f563b7da40 Add DbPlaylistItem base class to LibraryPlaylistItem
This will be used to move items from non-library databases away from the
LibraryPlaylistItem class.
2020-06-19 11:18:32 +01:00
Jim Broadus 247cc8f715 Add missing playlistitem.h to CMakeLists.txt 2020-06-19 11:18:32 +01:00
Clementine Buildbot 8c25c443cd Automatic merge of translations from Transifex 2020-06-19 02:28:31 +00:00
Jim Broadus 0d25a1b39c Properly delete ignored DeviceInfo object
Since the SimpleTreeItem constructor variant used from LoadAllDevices adds the
object to the parent's children list, use the parent's Delete method to destroy
it.
2020-06-19 00:10:54 +01:00
Clementine Buildbot 1ef5ec2590 Automatic merge of translations from Transifex 2020-06-18 02:27:25 +00:00
Clementine Buildbot 06544054a6 Automatic merge of translations from Transifex 2020-06-15 02:27:43 +00:00
Clementine Buildbot 56ed6d4f7e Automatic merge of translations from Transifex 2020-06-12 02:27:47 +00:00
Clementine Buildbot 6900197a8c Automatic merge of translations from Transifex 2020-06-10 02:28:25 +00:00
Jim Broadus cf8d2004bd Use deleteLater to destroy device backends 2020-06-07 14:46:13 +01:00
Jim Broadus c299c198de organise: Update the song preview when the selected destination's data changes
This will cause the file exensions to change when transcode options are changed.
2020-06-07 14:45:50 +01:00
Jim Broadus 4dd3233976 organise: Set extension override in OrganiseDialog
If the destination device has a transcode option set, then compute filenames
with updated extensions. This does not cover the case where Organise needs to
transcode due to format support.
2020-06-07 14:45:50 +01:00
Jim Broadus 2e921c6584 organise: Add a tag override mechanism to OrganiseFormat
Add a method to set override tag values when formatting a song name.
The use case for this is transcoding where the extension will change.
2020-06-07 14:45:50 +01:00
Jim Broadus 22cfade4a4 organise: Refresh filename after transcode 2020-06-07 05:34:08 +01:00
Clementine Buildbot 22537a4501 Automatic merge of translations from Transifex 2020-06-07 02:28:28 +00:00
Clementine Buildbot 4c9241db1a Automatic merge of translations from Transifex 2020-06-06 02:27:32 +00:00
Jim Broadus 236cfa7adf Don't include cdda code if HAVE_AUDIOCD isn't defined 2020-06-01 22:09:46 +01:00
Jim Broadus 3616a50d83 Don't modify the original request URLs when doing cdda fixup
The current URL is compared againt the unmodified next in some cases.
2020-06-01 22:09:46 +01:00
Jim Broadus 7e3cd84b5d Fix cdda playback
QUrl interprets a single number as an ip address, so the track URL cdda://1
would become cdda://0.0.0.1. A previous fix addresses this issue by adding an
extra character "a" to the affected URLs then removing the last instance of the
character upon usage. However, this didn't apply when a path was present
(cdda:///dev/sr0/1), but would still attempt to reverse the change later
(cdd:///dev/sr0/1).

This change applies the fix-up to all cdda urls and moves the conversion
utilities to a single location.

See: 335bc89c9 ("Workaround for broken CD playback in Qt5 (#6021)")
2020-06-01 22:09:46 +01:00
Clementine Buildbot bf3d3db234 Automatic merge of translations from Transifex 2020-06-01 02:27:31 +00:00
Clementine Buildbot 00f9597d37 Automatic merge of translations from Transifex 2020-05-31 02:27:35 +00:00
Clementine Buildbot c8d56776a8 Automatic merge of translations from Transifex 2020-05-30 02:28:35 +00:00
Clementine Buildbot 6f5fe724bb Automatic merge of translations from Transifex 2020-05-29 02:27:41 +00:00
dmdmdm a63a37a7ab Changed to translator comment 2020-05-28 19:40:57 +01:00
dmdmdm 32cb04f26b Change text for Original Year 2020-05-28 19:40:57 +01:00
SDNick484 ed0078b8d4 Adds missing QPainterPath include 2020-05-28 10:24:47 +01:00
Clementine Buildbot 1a73918f90 Automatic merge of translations from Transifex 2020-05-28 02:27:37 +00:00
dmdmdm f90babefa8 Minor smart playlist UI improvements 2020-05-27 21:02:24 +01:00
dmdmdm 0555cf5a35 Changed rgb() to rgba()
Avoids message:   
QCssParser::parseColorValue: Specified color without alpha value but alpha given: 'rgb 200, 200, 200, 75%'
2020-05-27 17:07:42 +01:00
Jim Broadus 84099f2491 Name all threads created by Application
In Application::MoveToNewThread, name the new thread after the object being
moved. Give those objects names as well.

The thread names display in gdb with "info threads".
2020-05-27 10:22:00 +01:00
Clementine Buildbot 5612c9cb5d Automatic merge of translations from Transifex 2020-05-27 02:28:50 +00:00
dmdmdm fa067bf5ce Smart playlist dialog fits in smaller screen 2020-05-26 21:11:57 +01:00
dmdmdm 5899f68e2f Smart playworks fit on smaller screens 2020-05-26 21:11:57 +01:00
Clementine Buildbot 54f200d9b9 Automatic merge of translations from Transifex 2020-05-26 19:48:40 +00:00
Jim Broadus 0271f43cc9 console: Add a Qt debug tab
Add a tab for Qt debug features. Initially provides access to dumpObjectTree() on
Application and MainWindow objects. This dumps the object's child objects to the
log.
2020-05-26 16:57:59 +01:00
Jim Broadus 32367d2d45 Add a name to the application class for debug purposes 2020-05-26 16:57:59 +01:00
Jim Broadus e3fa03e101 console: Refactor console dialog to use tabs 2020-05-26 16:57:59 +01:00
Jim Broadus a4e8d57de0 console: re-enable debug console option
Keep console option hidden by default, but add using CLEMENTINE_DEBUG_CONSOLE
env variable:
CLEMENTINE_DEBUG_CONSOLE=1 clementine
2020-05-26 16:57:59 +01:00
Jim Broadus 0fc0dcdb79 lyrics: Add 30s timeout for lyrics provider requests 2020-05-24 15:54:49 +01:00
Jim Broadus 6675b1b63e lyrics: Add debug info for lyric server replies 2020-05-24 15:54:49 +01:00
Jim Broadus 02a1fc9a07 lyrics: Use lambda for UltimateLyricsProvider requests
Remove map of requests to ids and pass info directly to reply handler.
2020-05-24 15:54:49 +01:00
Jim Broadus 7378e5b141 gstengine: Clean up buffer references in error cases 2020-05-23 11:07:34 +01:00
Jim Broadus 407a99b2fa gstengine: Use proper free function for gstreamer object
Use g_free instead of free for gstreamer allocated string. Ultimately g_free
calls free, but it also adds some glib debug instrumentation.
2020-05-23 11:07:34 +01:00
dmdmdm 7caf200efa Added CBC Podcasts 2020-05-21 02:04:08 +01:00
Jim Broadus 879dfa3d79 icecast: free backend on exit
Use a shared pointer since the model and search provider both hold pointers to
the backend object. Also removed unused accessor method.
2020-05-20 21:33:47 +01:00
Jim Broadus 8f56fbb83b Fix timer errors on exit
The NetworkRemote is moved to a new thread after creation. On that thread, its
child classes create timers. When the network remote class is deleted on the
main thread, we see "Timers cannot be stopped from another thread".

To avoid this error, use deleteLater to delete NetworkRemote and its composition
classes on its own thread.
2020-05-19 10:39:06 +01:00
Jim Broadus 6a5cb0712d gstengine: Fix gtreamer request pad leak
According to the gst_element_request_pad documentation, request pads must be
released after usage. They aren't automatically released and dereferenced when
the element is destroyed.
2020-05-15 11:12:34 +01:00
Jim Broadus 58569d9d0d Remove fetcher list from OutgoingDataCreator class. 2020-05-14 11:01:49 +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
Jim Broadus 96a17c9f40 settings: Only save settings for visited pages
Set a flag when a page is shown. On apply or accept, only save if that flag is
set.
2020-05-12 10:21:44 +01:00
Jim Broadus 77badd37ff settings: Add dialog methods to settings pages
Add Accept, Apply, Reject methods to settings pages to mirror dialog. This will
allow settings pages to handle these events at a more granular level and will
allow common behavor in the base class.
2020-05-12 10:21:44 +01:00
Jim Broadus 096203ac88 visualisations: Fix close action
Pressing the close button on the window sends a close event, where other methods
of exiting visualization just hide the window. If shown again after close, the
window will be empty. To fix this, handle and reject the close event. Call hide
instead.
2020-05-09 13:28:29 +01:00
Jim Broadus 7e7d271b30 Properly handle removal of top level items in StandardItemIconLoader
The rowsAboutToBeRemoved signal from the model provides a parent index, but with
QStandardItemModel, top level items are added to an invisible root item that
doesn't have a valid index. This causes the range check to miss top level items
due to a perceived parent mismatch. When the load completes, it attempts to
access an object that has been deleted.
2020-05-04 10:09:51 +01:00
Jim Broadus dc4270076d Change StandardItemIconLoader to require a QStandardItemModel
This should be a safe assumption since the loader operates on QStandardItem
objects.
2020-05-04 10:09:51 +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 72ac3cb88c OSDPretty: Check return of current_screen in showEvent 2020-03-30 10:55:54 +01:00
Jim Broadus 33ffb4973a OSDPretty: Fall back to primary screen
If current screen can't be find, use primary screen. This the
current behavior when used with older qt versions.
2020-03-30 10:55:54 +01:00
Jim Broadus 8706a39559 OSDPretty: Consolidate current_screen code in OSDPretty 2020-03-30 10:55:54 +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 52337bf7a4 Use legacy RedirectPolicyAttribute instead of FollowRedirectsAttribute.
RedirectPolicyAttribute was introduced in Qt 5.9, but Debian Stretch is at 5.7.
This change can be reverted when the base support version moves to 5.9.
2020-03-23 18:45:25 +00:00
Jim Broadus a85b3531c3 Handle redirects when downloading Spotify blob.
Use the NoLessSafeRedirectPolicy policy which will redirect as long as it isn't
from https to http.
2020-03-23 09:58:15 +00:00
Jim Broadus 94eb2dcfc1 Preserve auth headers when redirecting.
When redirecting, copy the original request, which may include extra headers.
2020-03-13 10:38:47 +00:00
Jim Broadus 8e6d09d445 Handle google drive token.
Use LoadResult auth header mechanism to pass auth token to pipeline as a header
instead of obsolete query string method.
2020-03-12 18:08:14 +00:00
Jim Broadus e338939c8b Add optional auth info to LoadResult.
Add auth_header_ to LoadResult. If it exists, populate the MediaPlaybackRequests
headers with an Authorization header with that value.
2020-03-12 18:08:14 +00:00
Jim Broadus 3c7b509d59 Add headers to MediaPlaybackRequest.
Add a name/value map for headers to MediaPlaybackRequest. When adding a new
gst source that accepts extra-headers (souphttpsrc), add these headers.
2020-03-12 18:08:14 +00:00
Jim Broadus 9ed5503ee3 Add MediaPlaybackRequest class.
Add a class to wrap the URL in the playback engines. In the future, this will
contain authentication information for the specified URL. It can also include
the start and end time as well as other data that is currently specified along
with the URL.
2020-03-11 10:57:21 +00:00
Jim Broadus 2c1ae986c5 Create a GstEngine::IsCurrentPipeline helper function for callbacks. 2020-03-09 10:21:07 +00:00
Power Snail 4fe845c2c5 Use reference on a const loop var to avoid copy
Clang 10 warns that ``s`` might be copied. Use a reference to avoid copying
2020-03-07 02:39:13 +00:00
Jonas Kvinge b762987cd6 Add missing mapToSource() in MainWindow::PlaylistRightClick 2020-03-06 11:10:02 +00:00
Jim Broadus 90cf4988ea Fix crash when searching playlist.
While iterating over expandList in refreshExpanded, calls to setExpanded cause
the list to be appended. Since QList uses an array implementation that must
reallocate when reserved space is exhausted, iterators are unsafe for this case.
Use indexes, which are O(1) in QLists, instead of iterators.
2020-02-24 13:45:42 +00:00
PowerSnail 531cd052ca use QT's High DPI attribute 2020-02-24 13:44:09 +00:00
Jim Broadus a8f656a933 Shortcut settings page cleanup.
- Group list and settings so they can be enabled/disabled together.
- Make default selection shortcut list. Previous behavior set options
  for the first item, but didn't highlight selection.
- Rename ItemClicked to CurrentItemChanged to reflect correct signal.
2020-02-23 16:08:05 +00:00
Jim Broadus 2179027a6d Prevent global shortcut crash on wayland.
The 3rd party qxt library assumes X11 on linux systems. Don't register
QxtGlobalShortcutBackend when using Wayland.
2020-02-23 16:05:57 +00:00
MorbidMind 60d3435324 Remove obsolete workarounds
Nvidia force close from 2011. Last driver version affected was 304.37, 304.83 is the last in the series and is from 2013.
macOS Soundcloud certificate - CA exists in the system bundle.
macOS font issue from 2013
Gnome volume control with Glib older than 2.36 - Debian Jessie, oldoldstable repo has 2.42
2020-02-23 16:05:26 +00:00
Jim Broadus bb736d1156 Prevent accidental usage of /usr/bin/data
Clementine detects a data directory in the same directory as the executable to
determine portable configuration. But there are some packages that create
/usr/bin/data, causing Clementine to run in portable mode.

Use a more unique data directory name, clementine-data, as the portable data
directory. For backwards compatibility, use the legacy data directory if the
already exists there.
2020-02-23 16:04:42 +00:00
Clementine Buildbot e1c8726661 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2020-02-21 10:11:26 +00:00
Jim Broadus 85651dd37f Fix assertion when deleting multiple queued items from playlist.
Removal of items from a playlist is done with a single transaction. When
Queue::SourceLayoutChanged is called after this, the items in the queue are
checked one at a time. When an item is removed, it triggers dataChanged signal
from the model, connected to the SourceDataChanged slot. There, ItemCountChanged
is emitted which calls UpdateTotalLength. This method will assert when it finds
an item that is in the queue, but not in the playlist.

To solve this, disconnect the ItemCountChanged signal at the beginning of
SourceLayoutChanged and re-enable it after cleaning the queue. The method emits
the signal before returning.
2020-02-21 10:09:12 +00:00
Jim Broadus 2f36b34c33 Remove some user info from logs. 2020-02-18 09:03:08 +00:00
Jim Broadus 4f9b81459a Remove leading / from google file id.
The Google Drive Client::GetFile currently fails due to an extra / in the
request. Use QString::remove to strip all "/" characters from the id.

Note: While this fixes the ability to get the media URL, a change to the
Google Drive API breaks the playback. This will be addressed in a future
commit.
2020-02-18 09:03:08 +00:00
Jim Broadus f81533bb58 Handle Google Drive get file errors.
When a call to translate a file ID to a URL fails, tell the user and
don't try to load the file.
2020-02-18 09:03:08 +00:00
Clementine Buildbot 06ed4a8232 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2020-02-17 20:33:23 +00:00
Jim Broadus 9116dfde7d Remove query string that may include auth info. 2020-02-17 20:31:06 +00:00
Jim Broadus 5983ecfac0 Scrub gstreamer error strings for url query strings.
Media URLs may include tokens or other auth info.
2020-02-17 20:31:06 +00:00
Jim Broadus 5dd6d6725a Add a function that scrubs URL queries from strings.
In some cases, URL queries contain auth information. For cases where error
strings are passed from other libraries, such as from gstreamer, add a utility
function, ScrubUrlQueries, to strip queries from URLs in strings.
2020-02-17 20:31:06 +00:00
Jim Broadus a0bb8ab3a1 Replace closures with new Qt functor variant of connect. 2020-02-15 15:00:49 +00:00
Jim Broadus 58e59adcfc Pass correct type to FetchContentUrlFinished. 2020-02-15 15:00:49 +00:00
Jim Broadus b86b8a45cc Fix dropbox json parsing.
Incorrect QJsonDocument::fromBinaryData was used several places in
DropboxService. Add a single ParseJsonReply method to the base class that
properly checks and parses network replies and reports errors.
2020-02-15 15:00:49 +00:00
Jim Broadus 941e139a18 Replace closures with connect variant.
Qt5 introduced new connect variants that allow calling a functor. A lambda can
replace the user of the Closure class in this case.
2020-02-13 19:20:01 +00:00
Jim Broadus b3ec030ae4 Fix songkicks queries.
- When parsing a response, use fromJson instead of fromBinaryData.
  fromBinaryData expects a serialized binary format.
- Calling toString on a non-string JSON value will return an empty
  string. Call toVariant().toString() to do the conversion.
- Add checks for network reply errors.
2020-02-13 19:20:01 +00:00
Jim Broadus 61de3c6e93 Convert remaining QJsonValue::isUndefined usage.
Noted previously, using the [] operator on a non-const QJsonObject causes the
creation of the key and does not work for checking existence. Convert the
remaining isUndefined call sites to use QJsonObect::contains.
2020-02-13 11:12:52 +00:00
Jim Broadus 52fd6ffadc Add a logging category to log all network requests.
New logging class NetworkRequests disabled by default, but can be enabled with
the command line option.
2020-02-13 11:09:51 +00:00
Jim Broadus a5db937d23 Fix itunes search.
Using the [] operator on a non-const QJsonObject inserts an item. The test
for an error message was always positive. Use the contains method instead.
2020-02-12 09:53:45 +00:00
Jim Broadus 415e4aa2ec Don't attempt to resolve URL if not relative. 2020-02-12 09:53:12 +00:00
Jim Broadus e7b0667196 Fix loading songs on portable setup.
QUrl considers a URL relative if it does not include a scheme and QUrl::resolve
will fail if passed a non-relative url. Strip the scheme for the portable cases.

https://doc.qt.io/qt-5/qurl.html#relative-urls-vs-relative-paths
2020-02-12 09:53:12 +00:00
Jim Broadus b9f57c574f Add QString version of GetRelativePathToClementineBin.
Avoid converting paths to and from URLs when calling this function.
2020-02-12 09:53:12 +00:00
Jim Broadus ba4320859d Change LibraryDirectoryModel to take shared backend pointer.
This is mainly for parity amongst the library model classes.
2020-02-11 08:09:22 +00:00
Jim Broadus bc99ff80a9 Move LibraryDirectoryModel out of LibraryModel.
There are several instances of the LibraryModel class used in the system. Each
of these creates a LibraryDirectoryModel instance, but only the instance held
by the main library is every used. Move this out of the LibraryModel class and
into the Library class.
2020-02-11 08:09:22 +00:00
Jim Broadus 18a08e87c2 Add a directory_model accessor to Application class. 2020-02-11 08:09:22 +00:00
Clementine Buildbot 057343f4a3 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2020-02-07 10:08:21 +00:00
Jim Broadus efb4f8a15a Handle errors from icecast directory requests.
When a request fails, show an error dialog and don't attempt to parse results.
2020-02-07 10:06:14 +00:00
Jim Broadus 2132310873 Display message to user when IntergalacticFM channel list fails.
At the time of this commit, the channel list from intergalactic.fm is
unavailable. To the user, this is failing silently. Add an error message for
this failure. If this issue persists, then the service should be removed or a
hardcoded station list should be used.
2020-02-07 10:05:39 +00:00
Clementine Buildbot 7e915648eb Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2020-02-04 00:25:34 +00:00
Jim Broadus d45a9f5c53 Enable debug logging for GstEnginePipeline by default.
Use qLogCat to put verbose GStreamer callback messages into a new
GstEnginePipelineCallbacks category. Filter that category instead of
the entire class by default.
2020-01-31 10:24:53 +00:00
Jim Broadus d3d6c1ff3c Fix UNC paths.
The fix-up for URLs for files that that begin with // no longer works since the
QUrl class determines that these modifications are invalid, resulting in an
empty string when converted. Instead of attempting to modify the QUrl, add a
utility function that makes the correction on the encoded byte array at time of
usage.
2020-01-29 00:38:43 -08:00
Jonas Kvinge f674847431 Use HTTPS 2020-01-27 22:46:38 +01:00
Jim Broadus feaca363a7 Remove directory by id.
Eliminate need to create temporary Directory object when removing a directory.
2020-01-25 18:22:16 -08:00
Jim Broadus 1c6e43509c Cancel scan when directory is removed.
When a directory is removed from the library during a scan, the scan continues
until complete. This change cancels the scan immediately, unblocking the watcher
thread, then signals the watcher to remove the directory.

A second issue occurs when a previously scanned device is removed during a
scan. All remaining files will be marked as deleted. This change mitigates
this issue, but a timing hole still remains here.
2020-01-24 10:28:51 -08:00
Clementine Buildbot fcd147b574 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2020-01-24 10:41:42 +00:00
Jim Broadus c40a1f7738 Pass album_art map to ImageForSong as pointer instead of reference.
Requested as part of PR 6543.
2020-01-23 09:15:39 -08:00
Jim Broadus 4ebd3c8c0a Add ability to cancel scan per directory.
Store a boolean along with watched directories to indicate active. Use this flag
to provide a mechanism to halt scans on a per-directory basis.
2020-01-23 09:15:36 -08:00
John Maguire 97ffae2e70
Merge pull request #6541 from jbroadus/cleanup-lister-thread
Delete DeviceLister worker thread.
2020-01-22 11:05:51 +00:00
Jim Broadus 83d756356c Delete DeviceLister worker thread.
This isn't a serious leak since the lister is only destroyed when Clementine
exits.
2020-01-21 21:26:59 -08:00
Jim Broadus 52c3ce70ea Pass a Directory reference to ScanTransaction instead of a directory id.
This is can be done without protecting the directory reference since the method
that removes directories from the watch list is only called on the same thread
as the scan, and never during the life of the ScanTransaction object.
2020-01-21 17:27:01 -08:00
John Maguire d15777ea15
Merge pull request #6537 from jbroadus/scan-sanity-check
Prevent runaway cover art searches.
2020-01-19 17:12:13 +00:00
Jim Broadus 1484afb038 Prevent runaway cover art searches.
When scanning a device such as a mobile phone, it's likely that a directory
containing both image and audio files will be found. Besides the appearance of a
hung scan, it's unlikely that a relevant image will be found.

In the case where filters for relevant filenames don't yield results, set a
sanity limit on the number of images. If the list size is beyond than that
threshold, return an empty path.
2020-01-18 22:46:24 -08:00
Jim Broadus 9e40c5e1a9 Fix hung progress indicator on device disconnect.
When a device is removed during a scan, the scan is cancelled, but the task is
not set to finished.
2020-01-18 20:32:41 -08:00
Jim Broadus 34a2e86b4b Handle FileSystemWatcherInterface::AddPath errors.
On Linux systems, failure to watch a path may be caused by the limit set in
/proc/sys/fs/inotify/max_user_watches. This can be demonstrated by creating
a directory with a large number of empty subdirectories and adding that test
directory as a library.

Check that a file is readable before adding a watch. If adding the watch fails,
report the error to the user only once. Only add the path to subdir_mapping_
if watch succeeds.
2020-01-17 16:26:09 -08:00
Jim Broadus 26e12f5006 Support newlines in error dialog.
Translate "\n" to "<br>" in error dialog HTML.
2020-01-16 21:06:11 -08:00
Jim Broadus fe84ad4e66 Return boolean from FileSystemWatcherInterface::AddPath to indicate success.
QFileSystemWatcher::addPath returns a boolean to indicate success. Modify
QtFSListener::AddPath to reflect that. For now, the MacFSListener version will
always return true.
2020-01-16 21:06:11 -08:00
Jim Broadus 4bb7d41ec9 Fix mtp and gphoto2 device mounts from gvfs.
Using libmtp or libgphoto2 to access a device that gvfs has mounted causes the
connection to fail. libmtp is calling libusb_claim_interface which, according to
libusb documentation, will return LIBUSB_ERROR_BUSY if claimed by a different
program. For mtp and gphoto2 devices discovered by the GioLister, use the file
scheme and access the device through the gvfs mount.
2020-01-16 13:11:49 -08:00
Jim Broadus 5efba58f02 Decode gvfs uris.
The uri returned from g_file_get_uri is percent encoded. This causes the regex
in GioLister::MakeDeviceUrls to fail and causes the URL to be invalid. In this
case, it falls back to the file scheme. Newer versions of gvfs obtain the serial
id from udev instead of using the bus and device IDs.

Note that this bug covers a different issue where mtp is failing to connect. The
result is actually desired behavior. The follow-up change will address this.
2020-01-16 13:11:44 -08: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
Jim Broadus f817e0de48 Prevent deletion of LibraryModel object while async query is running.
Create a thread pool for each LibraryModel object and block destruction until
all threads that are operating on this object are complete.

Note that this is not a complete solution. The async query also uses the library
backend which may still be deleted before the thread exits. This will be
addressed in a future change.
2020-01-12 12:24:21 -08:00
Clementine Buildbot a97080a809 Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2020-01-08 10:45:49 +00:00
Jim Broadus 8a88a0a57e Properly handle connect errors when initiated from properties dialog.
If connection fails when initiated from the device properties dialog, the
connected page is shown after the update formats worker thread completes.
2020-01-07 23:20:04 -08:00
Jim Broadus 79b7e3fe13 Fix abort from Mtp loader thread.
A commit in qt 5.7 changes a qWarning to a qFatal if a QThread is still running
when it's deleted. When we get the LoadFinished signal in MtpDevice, stop
the loader thread's event loop to avoid this situation.

See qtbase commit c8277b6e532
2020-01-07 22:29:59 +00:00
Pavel Liavonau 3f4c788339 Fixed lastfm workflow with "now playing" and scrobbling feature
(Maybe Issue #2672)
2020-01-07 22:29:23 +00:00
Jim Broadus 39e75071bf Remove unhelpful debug message.
Message contains no context and appears to be a remnant of a debug session.
2020-01-05 16:51:11 -08:00
John Maguire 008c90ff29
Merge pull request #6516 from jonaski/sizeinbytes
Use QImage::sizeInBytes() with Qt 5.10 and above
2020-01-06 00:12:02 +00:00
John Maguire 57841cf947
Merge pull request #6515 from jonaski/child
Replace QModelIndex::child() with QAbstractItemModel::index()
2020-01-06 00:11:22 +00:00
John Maguire b45b6bace0
Merge pull request #6514 from jonaski/elapsedtimer
Replace QTime with QElapsedTimer
2020-01-05 18:40:36 +00:00
Jonas Kvinge e98c11fe64 Use QImage::sizeInBytes() with Qt 5.10 and above 2020-01-05 19:31:40 +01:00
Jonas Kvinge 6b50d5140d Fix formatting 2020-01-05 19:09:03 +01:00
Jonas Kvinge e63c1edbbf Fix formatting 2020-01-05 19:08:03 +01:00
Jonas Kvinge 341a4d1423 Replace QTime with QElapsedTimer 2020-01-05 19:01:54 +01:00
Jonas Kvinge 959a957a56 Replace QModelIndex::child() with QAbstractItemModel::index() 2020-01-05 18:37:27 +01:00
John Maguire 0991209087
Revert "Add an option to specify a gpodder server." 2020-01-05 17:10:00 +00:00
John Maguire 41c103413c
Merge pull request #6497 from jbroadus/gpodder-server
Add an option to specify a gpodder server.
2020-01-05 15:27:08 +00:00
John Maguire 19389cace7
Merge pull request #6511 from jonaski/screen
Use QWidget::screen() to fix compile with Qt 5.14
2020-01-05 15:22:38 +00:00
John Maguire 400203cfa2
Merge pull request #6510 from jonaski/searchtermwidget
Fix layouts with duplicate name in SmartPlaylistSearchTermWidget
2020-01-05 15:22:15 +00:00
Clementine Buildbot 257e1be43d Automatic merge of translations from Transifex (https://www.transifex.com/projects/p/clementine/resource/clementineplayer) 2020-01-05 15:16:39 +00:00
John Maguire 10e807dd7d
Merge pull request #6509 from jonaski/tolist
Replace QSet::toList() with QSet::values()
2020-01-05 15:13:33 +00:00
Jonas Kvinge 1b23417a93 Use QWidget::screen() to fix compile with Qt 5.14 2020-01-05 02:51:08 +01:00
John Maguire 7d2c622d0f
Merge pull request #6507 from jonaski/sprintf
Replace use of QString::sprintf with QString::asprintf
2020-01-05 00:40:43 +00:00
John Maguire 2c960f12f7
Merge pull request #6504 from jonaski/seafile
Initialize QObject in constructor and add explicit
2020-01-05 00:39:28 +00:00
John Maguire a875c3b91f
Merge pull request #6506 from jonaski/styleoptionframe
Replace use of QStyleOptionFrameV3
2020-01-05 00:30:40 +00:00
John Maguire 5123d1dd37
Merge pull request #6505 from jonaski/fallthrough
Add fallthrough comment where fallthrough is intended
2020-01-05 00:30:24 +00:00
John Maguire cfa3ea0dca
Merge pull request #6503 from jonaski/darker
Replace use of QColor::dark and QPalette::background
2020-01-05 00:30:04 +00:00
John Maguire 94630bd58b
Merge pull request #6502 from jonaski/desktopwidget
Replace all uses of QDesktopWidget with QScreen
2020-01-05 00:29:33 +00:00
John Maguire a240818b6c
Merge pull request #6501 from jonaski/compilations
Fix songs stuck in various artists
2020-01-05 00:28:15 +00:00
John Maguire b10cc71c76
Merge pull request #6500 from jonaski/pixmapcache
Remove pixmap cache and pending art when removing parent nodes instead
2020-01-05 00:27:36 +00:00
Jonas Kvinge 52180a7484 Fix layouts with duplicate name in SmartPlaylistSearchTermWidget 2020-01-05 01:15:58 +01:00
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