Commit Graph

6186 Commits

Author SHA1 Message Date
Clementine Buildbot 2725ef99d5 Automatic merge of translations from Transifex 2021-02-02 02:56:25 +00:00
Clementine Buildbot 50ee786135 Automatic merge of translations from Transifex 2021-02-01 02:55:24 +00:00
Clementine Buildbot 816fd88d48 Automatic merge of translations from Transifex 2021-01-31 02:55:13 +00:00
Clementine Buildbot 8db8b1e788 Automatic merge of translations from Transifex 2021-01-30 02:55:19 +00:00
Jim Broadus 18eef830a5 transcoder: Add ability to dump pipeline graphs
Add a "Dump Graph" menu option to the pipeline view if CLEMENTINE_DEBUG
is enabled.
2021-01-29 22:30:03 +00:00
Jim Broadus 7d061afdc3 gstengine: Add PipelineView class
Add ListView derivative class for displaying GstPipelineModel data. A
GetSelectedIds method provides the list of selected pipelie IDs.
2021-01-29 22:30:03 +00:00
Jim Broadus 8d11e9ffab transcoder: Remove unused slots
Transcoder::Start() and Transcoder::Cancel() were defined as slots but
never used as such.
2021-01-29 13:12:26 +00:00
Jim Broadus d4c9628222 transcoder: Don't show progress when nothing is selected
Previously, pressing the "Start transcoding" button with zero files selected
would show the progress group with the progress bar in the busy state.
2021-01-29 13:12:26 +00:00
Clementine Buildbot 78d4c4f3f7 Automatic merge of translations from Transifex 2021-01-29 02:56:20 +00:00
Clementine Buildbot b9a8442632 Automatic merge of translations from Transifex 2021-01-28 02:54:59 +00:00
Jim Broadus 7ba322b10b debug: Generalize debug feature check
Move the debug console variable check to a static method in the
Application class and use environment variable CLEMENTINE_DEBUG instead
of CLEMENTINE_DEBUG_CONSOLE. This will allow debug features to be
enabled elsewhere in the code.

Example:
CLEMENTINE_DEBUG=1 clementine
2021-01-27 15:14:40 +00:00
Clementine Buildbot 79ca9147e9 Automatic merge of translations from Transifex 2021-01-27 02:54:57 +00:00
Maarten Jacobs cb88954a3b Changed usage of boolean to enumeration
Changed the NextInternal() and NextItem() methods to use a enumerated value to track whether "next track" or "next album" is desired
2021-01-26 23:35:10 +00:00
Maarten Jacobs 8fcdbd5114 Adding a "play next album" function, in addition to "play next
track".

Changed shortcut key for Next Album from "space" to F9

Fixed indentation in player.cpp

Fixed spacing in player.cpp.

Updated player.cpp to ensure while loop takes into consideration the last
song on the playlist.

Fixed lint formatting error in player.cpp

Additional changes to player.cpp to make sure next album search reacts properly to the given repeat mode.

Updated player.cpp to address cpplint issues.

Fixing formatting issues.

Fixing formatting errors.

Finished formatting updates.

Final formatting...

Final formatting

Really final formatting...

Addressed issues from code review.

Added functionality to disable Next Album option when repeat mode is "repeat track".

Added commentary to recent changes.

Disable Next Album action also when Repeat Mode is Repeat_Album

In addition to disabling this action for the Next_Track repeat mode, the same applies to the Next_Album repeat mode.
2021-01-26 23:35:10 +00:00
Jim Broadus 8c2ab8fa05 transcoder: Add pipeline list to details dialog
List current running transcode pipelines when the details dialog is displayed.
This will be allow the addition of cancel and debug options.
2021-01-26 10:31:25 +00:00
Jim Broadus befaacebf9 gstengine: Add a model for pipelines
Provide GstPipelineModel for displaying lists of GstPipelineBase instances.
2021-01-26 10:31:25 +00:00
Clementine Buildbot a7a32b08b6 Automatic merge of translations from Transifex 2021-01-22 03:38:11 +00:00
Clementine Buildbot 76c87146dd Automatic merge of translations from Transifex 2021-01-21 03:38:44 +00:00
Clementine Buildbot 447e91a68e Automatic merge of translations from Transifex 2021-01-20 03:37:48 +00:00
Clementine Buildbot a9e193234e Automatic merge of translations from Transifex 2021-01-19 03:35:37 +00:00
Clementine Buildbot 7854aefdd6 Automatic merge of translations from Transifex 2021-01-18 03:34:38 +00:00
Clementine Buildbot f1678fd33c Automatic merge of translations from Transifex 2021-01-17 03:35:38 +00:00
Clementine Buildbot 81a3c0f83c Automatic merge of translations from Transifex 2021-01-15 03:33:21 +00:00
Jim Broadus cf842a8c5a gstengine: Use existing stream id to track background streams
New ids were being created for background stream mapping, but streams already
have unique IDs that can be used for this.
2021-01-14 11:29:43 +00:00
Clementine Buildbot 72e2e62eb1 Automatic merge of translations from Transifex 2021-01-14 03:36:26 +00:00
Jim Broadus 4f5bf1cc6f gstengine: Give pipelines unique names
Currently, most pipelines are named "pipeline". Use a type string in combination
with the stream id to give each pipeline a unique name.
2021-01-13 22:59:49 +00:00
Jim Broadus 5ffdb7d98c gstengine: Move pipeline id handling to base class
Move the id and the global counter from GstEnginePipeline to GstPipelineBase.
Make counter atomic.
2021-01-13 22:59:49 +00:00
Clementine Buildbot 2dd424a195 Automatic merge of translations from Transifex 2021-01-13 03:27:02 +00:00
Jim Broadus ace5234e62 transcoder: Fix flacenc "insane" level encoding
The gstreamer flacenc element defines a set of quality levels that is different
from the standard flac library. Its highest level, labeled "insane", uses
settings that are outside of the streamable subset. Set the streamable-subset
property to false for this level.

Reference: https://xiph.org/flac/format.html#subset
2021-01-12 11:47:12 +00:00
Clementine Buildbot e1e559732b Automatic merge of translations from Transifex 2021-01-12 03:20:36 +00:00
Clementine Buildbot b3aed042eb Automatic merge of translations from Transifex 2021-01-11 03:16:59 +00:00
Jim Broadus f779652aa2 Localize song count in playlist
Use %Lx to localize number formatting.

Reference: https://doc.qt.io/qt-5/qtquick-internationalization.html#5-use-lx-so-numbers-are-localized
2021-01-10 21:58:54 +00:00
Jim Broadus 7b94309827 transcoder: Use GstPipelineBase class for pipeline
This allows the use of the DumpGraph method in transcoding pipelines. The call
can be added to Transcoder::StartJob for debugging. In the future, a trigger
may be added to the debug console ui.
2021-01-10 18:14:57 +00:00
Jim Broadus f9e9dae73d gstengine: Add a base class for pipelines
This allows debug functionality to be shared.
2021-01-10 18:14:57 +00:00
Clementine Buildbot 8c774e3880 Automatic merge of translations from Transifex 2021-01-10 03:17:22 +00:00
Jim Broadus 25d3fca079 gstengine: Fix output audio depth
When the decoder bin's src pad becomes available, check its caps
for a format. If the format is not S16LE, then apply F32LE caps
before the tee. This prevents the pipeline from negotiating
S16LE when the decoder produces other formats.
2021-01-06 20:39:33 +00:00
Jim Broadus 06066dfba4 gstengine: Add a caps filter in pipeline before tee 2021-01-06 20:39:33 +00:00
Jim Broadus 2b17170bf8 gstengine: Move the probe capsfilter to the correct side of the converter
The pipeline currently constructs a caps filter between the tee and the
probe audio converter. This requires that S16LE data is fed to the tee.
2021-01-06 20:39:33 +00:00
Clementine Buildbot 479f1d4de9 Automatic merge of translations from Transifex 2021-01-04 03:05:13 +00:00
Clementine Buildbot 8201c10355 Automatic merge of translations from Transifex 2021-01-03 03:03:01 +00:00
Clementine Buildbot 8f863bc969 Automatic merge of translations from Transifex 2021-01-02 02:58:52 +00:00
Benjamin Valentin 3efa68f07d internet/soma.fm: use high quality AAC stream
Prefer the high quality 130 kbit/s AAC stream over the 'fast' 128 kbit/s
mp3 stream.
2021-01-01 18:00:59 +00:00
Jim Broadus 409c6b89d1 gstengine: Add a gstreamer debug console page
New page initially provides a button that triggers a dump of a graph of the main
pipeline.
2021-01-01 16:26:29 +00:00
Jim Broadus c353deba0c gstengine: Add a DumpGraph method to GstEnginePipeline
This will write a .dot graph and can be integrated with the debug console.
2021-01-01 16:26:29 +00:00
Jim Broadus 0ee64a32f6 console: Add a mechanism to allow components to add pages
Add a MainWindow signal that is emitted when a debug console is created. Relay
that signal to the Application. Add an AddPage method to the Console class that
allows components to populate pages when they receive the signal.
2021-01-01 16:26:29 +00:00
Clementine Buildbot 2b99d32bee Automatic merge of translations from Transifex 2021-01-01 03:01:46 +00:00
Jim Broadus 63a73a4a55 Fix debug console instance leak
Each time the debug console is launched, a new instance is created, but never
deleted. To fix, create one instance, if the option is enabled, and show that
one each time the menu option is selected.
2020-12-31 21:07:58 +00:00
Clementine Buildbot dc2c1e1117 Automatic merge of translations from Transifex 2020-12-29 02:57:55 +00:00
Clementine Buildbot 87cd3d2aba Automatic merge of translations from Transifex 2020-12-28 02:56:46 +00:00
Jim Broadus a012e7e273 gstengine: Fix InitFromString return value
GstEnginePipeline::InitFromString was attempting to link the decoder and audio
bins twice and returning the result of the failed second attempt as it's own
status. The return value was also being ignored by the caller.
2020-12-27 21:50:06 +00:00
Clementine Buildbot 0393d865ca Automatic merge of translations from Transifex 2020-12-27 02:55:57 +00:00
Jim Broadus 616ccc6fde gstengine: Remove extra unref on element creation failure
GstEngine::CreateElement unrefs the supplied bin if an error
occurs. In all current cases, that bin is referenced by a
pipeline.
2020-12-26 22:14:23 +00:00
Clementine Buildbot 5495445175 Automatic merge of translations from Transifex 2020-12-26 02:55:52 +00:00
Clementine Buildbot faab7fa6c5 Automatic merge of translations from Transifex 2020-12-25 02:56:29 +00:00
Clementine Buildbot 870969ef42 Automatic merge of translations from Transifex 2020-12-23 02:57:28 +00:00
Jim Broadus c999fc70e2 Fix hang during internet model reset
An old hack was notifying MergedProxyModel users that max int rows had been
removed when a submodel was reset. This caused the code that invalidates
selected items to spin for a very long time. A modelAboutToBeReset signal,
introduced in Qt 4.6, allows notification before the submodel information is
lost.

Note: there is one other case, in RemoveSubModel, where this hack is used.
This is only called when a device is removed and doesn't trigger this
condition, but it should probably be addressed in the future.
2020-12-22 20:40:05 +00:00
Clementine Buildbot 9f8093a22b Automatic merge of translations from Transifex 2020-12-22 02:56:44 +00:00
Clementine Buildbot 863a668240 Automatic merge of translations from Transifex 2020-12-21 02:54:48 +00:00
Clementine Buildbot af4810a581 Automatic merge of translations from Transifex 2020-12-20 02:51:13 +00:00
Clementine Buildbot 51c600a537 Automatic merge of translations from Transifex 2020-12-19 02:51:12 +00:00
Clementine Buildbot 6a6ef729ef Automatic merge of translations from Transifex 2020-12-18 02:52:23 +00:00
Matthieu Bruel 41513527cd hatstand code review update 1 2020-12-17 12:23:30 +00:00
Matthieu Bruel 114802a0ca Adding links to new remote in network remote settings 2020-12-17 12:23:30 +00:00
Matthieu Bruel 7d038c7354 Missing filechooserwidget files... 2020-12-17 12:23:30 +00:00
Matthieu Bruel 9714b0632d All changes for ClemRemote v1.0 (in one go) 2020-12-17 12:23:30 +00:00
Robert-André Mauchin cfcd0a956e Drop -std=c++0x and -U__STRICT_ANSI__
This was causing compilation failures, static assertion failed, with GCC 11.

Fix #6865

Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
2020-12-17 11:28:09 +00:00
Jim Broadus ccba649f62 Clear cached indexes in InternetModel when rows are removed
When opening a context menu on an internet item, the selected items are stored
in the InternetModel instance. In cases when the items are removed, certain menu
options can cause a crash. A specific case is downloading a podcast when the
user has chosen to limit the number of visible episodes. The subtree for the
podcast is rebuilt after the download completes, so if a context menu was opened
during the download time, selecting the append to playlist option will attempt
to operate on bad indexes.

This fix uses the rowsAboutToBeRemoved signal to remove these stored indexes.

There are likely another rare cases where the indexes can become invalid. For
example, sibling items within a subtree may be removed, causing the stored
indexes to become incorrect or out of range.
2020-12-15 22:36:30 +00:00
Clementine Buildbot c1c43e9a67 Automatic merge of translations from Transifex 2020-12-13 02:43:47 +00:00
Clementine Buildbot 91bad31f68 Automatic merge of translations from Transifex 2020-12-09 02:41:23 +00:00
Clementine Buildbot ba8fc09a65 Automatic merge of translations from Transifex 2020-12-07 02:38:38 +00:00
Jim Broadus 01f0727649 giolister: Don't include invalid mountpoint url
If the gvfs mountpoint property for a volume is empty, we add an empty URL to
the devices URL list. This causes errors in duplicate entry detection.
2020-12-06 12:59:50 +00:00
Clementine Buildbot df262c5c7e Automatic merge of translations from Transifex 2020-12-06 02:37:13 +00:00
Jim Broadus cca48b1ebf giolister: Ignore mountpoints
Read the G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT attribute (unix::is-mountpoint) to
determine if a volume is a mount that udisks2 has detected. Ignoring these
prevents network mounts from showing up as devices.
2020-12-05 13:24:54 +00:00
Clementine Buildbot f5c904b267 Automatic merge of translations from Transifex 2020-12-05 02:35:11 +00:00
Jim Broadus 1a0b288a8f giolister: Remove extra g_object_unref
GioLister::UnmountDevice calls g_object_unref on the GVolume object held by a
DeviceInfo. This appears to be left over from a time before DeviceInfo held
onto the volume.
2020-12-04 22:07:01 +00:00
Jim Broadus abc70554f3 giolister: Append _ to some DeviceInfo class members
Rename drive, mount, and volume to drive_, mount_, and volume_ to
avoid confusion with method arguments.
2020-12-04 22:07:01 +00:00
Clementine Buildbot 20f49c4454 Automatic merge of translations from Transifex 2020-12-03 02:34:21 +00:00
Clementine Buildbot 41b1ba8ffc Automatic merge of translations from Transifex 2020-12-02 02:33:31 +00:00
Clementine Buildbot c4d22d4414 Automatic merge of translations from Transifex 2020-12-01 02:33:42 +00:00
Clementine Buildbot f60c422242 Automatic merge of translations from Transifex 2020-11-30 02:33:52 +00:00
NicolasToussaint 7b3e2dfd8c PlayPlaylist: set current and not active playlist to selection 2020-11-30 01:50:58 +00:00
Clementine Buildbot f17e29f41d Automatic merge of translations from Transifex 2020-11-29 02:32:32 +00:00
NicolasToussaint b2044a5be5 apply PR recomendations 2020-11-28 20:24:56 +00:00
NicolasToussaint ee72b974bf add CLI play-playlist option, to play given playlist name. 2020-11-28 20:24:56 +00:00
Clementine Buildbot c536dc88e9 Automatic merge of translations from Transifex 2020-11-28 02:31:39 +00:00
Clementine Buildbot eec7641ef7 Automatic merge of translations from Transifex 2020-11-27 02:31:50 +00:00
Clementine Buildbot d417aed29f Automatic merge of translations from Transifex 2020-11-26 02:31:54 +00:00
Clementine Buildbot c856a66176 Automatic merge of translations from Transifex 2020-11-25 02:31:22 +00:00
Clementine Buildbot d970b74003 Automatic merge of translations from Transifex 2020-11-24 02:31:19 +00:00
Clementine Buildbot ae4948ce32 Automatic merge of translations from Transifex 2020-11-23 02:30:52 +00:00
Clementine Buildbot 1daf43f914 Automatic merge of translations from Transifex 2020-11-07 02:29:09 +00:00
Clementine Buildbot eefb96bdce Automatic merge of translations from Transifex 2020-11-03 02:27:29 +00:00
zan 16d09ace07 Fix visibility incongruences 2020-11-02 11:07:42 +00:00
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