Commit Graph

575 Commits

Author SHA1 Message Date
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
Jonas Kvinge 1a2274bd2b Merge branch 'master' into qt5-update 2019-07-21 14:20:59 +02: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
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
Filip Gawin be827f4f7f Simplify some statements 2019-02-22 18:49:48 +01:00
Jonas Kvinge d260c8b6d8 Fix saving playlist columns (#6222) 2018-11-29 21:33:52 +00:00
Jonas Kvinge 8c198a99a5 Qt 5 fixes 2018-11-21 10:31:17 +00:00
Jonas Kvinge d4fab4a2ea Merge remote-tracking branch 'upstream/master' into qt5-update 2018-11-11 22:46:07 +01:00
Victor Parmar f4d84bc05a Split last.fm scrobbling and play count calculation, closes #5771 (#6179)
Also add a configurable option to increment the play count if song has played for a shorter duration.
2018-10-20 12:57:49 +01:00
Amish Naidu 107e945872 Convert uses of QtAlgorithms to std:: algorithms 2018-10-09 19:17:54 +01:00
Amish Naidu 34e007f2b8 Port 'Allow ignoring prefixes when sorting playlist' to master (#6166)
* Allow ignoring prefixes when sorting playlist

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

* Change QStringLiteral to QString for compatbility with Qt 4.8
2018-10-08 16:24:36 +01:00
Amish Naidu fb00835468 Allow ignoring prefixes when sorting playlist
This introduces new configuration options which allow you to ignore
prefixes while sorting the playlist on album, artist and titles.
Prefixes are configurable, default are "a" and "the".
2018-10-05 10:56:49 +01:00
Jonas Kvinge c29c2e95cc Fixed merge conflicts 2018-09-30 15:11:06 +02:00
Kerem Seyhan 4ac2dedefa Added mouse forward and back button actions. 2018-08-14 17:09:55 +01:00
David Guillen Fandos 4a1236f8da Reduce some CPU load by disabling/fixing some UI stuff
- Disabling playlist row glow by default
 - Track slider popup visible by default, add hide()
    to ensure not visible by default (no more repaints)
 - Set kTrackSliderUpdateTimeMs to 500. IMO 40 is too low

This should partially fix issue #1079
2018-08-08 22:39:54 +01:00
Jonas Kvinge a5e8eba91c Merge remote-tracking branch 'upstream/master' into qt5-update 2018-06-29 02:38:19 +02:00
vaterlangen fcf96cb6ff Queue size and duration is now displayed in queue manager && Album Cover Popup fixes (#6086) 2018-06-18 14:21:44 +01:00
Clang Formatter 083129f41c Automatically formatted 2018-06-13 20:37:13 +00:00
vaterlangen 465fa2ce87 Clicking on songs in playlists via remote control now respecting behavioural settings from GUI (either direct changes it or enques it) 2018-06-13 22:03:23 +02:00
Antonio Russo 6a312e7459 Limit both QSettings reads and writes (#6057)
Any access, read or write, via QSettings requires locking
`Clementine.conf`. On some devices, this can be slow. Moreover, it also
increases power use and wear on devices such as SSDs.

To improve the situation, defer QSettings updates until program close
for window resize, current playlist tab, and playlist geometry, i.e.
`PlaylistView::SaveGeometry`.

Also, limit `PlaylistView::LoadGeometry` to once per program run.

Signed-off-by: Antonio Russo <antonio.e.russo@gmail.com>
2018-05-22 11:18:54 +01:00
Chocobozzz 16b4f9a991
Merge remote-tracking branch 'upstream/master' into qt5 2018-05-14 08:25:27 +02:00
Mark Furneaux d28a318437 Clang format 2018-04-14 16:57:06 -04:00
Mark Furneaux 2793cfa7fb Add to loaderinserter 2018-04-14 16:31:48 -04:00
Mark Furneaux 3626d84964 Add play next from library 2018-03-18 22:44:00 -04:00
Mark Furneaux a789ce82ca Allow playing of tracks already in queue 2018-03-18 22:03:04 -04:00
Mark Furneaux 6e387c2578 Initial playlist implementation 2018-03-18 14:43:44 -04:00
Andreas Sturmlechner 55a39a9609 Fix build with Qt 5.11 (#6029) 2018-03-17 02:16:49 -04:00
Jonas Kvinge e52c7f6475 Fix formatting 2018-03-12 07:55:59 -04:00
Jonas Kvinge d33ac6ef81 Fix background not loading. 2018-03-12 07:55:59 -04:00
Jonas Kvinge c393926be6 Fix background not loading. 2018-03-12 07:55:59 -04:00
John Maguire 4273c03132 Merge branch 'master' into qt5 2018-02-19 16:46:42 +00:00
Chocobozzz 70f68b1926
Merge remote-tracking branch 'upstream/master' into qt5 2018-02-01 09:50:42 +01:00
Vikram Ambrose 5e065609b6 Ensure song items are shown on Favorited signal
There was an issue where the song items were only being shown
from a fresh start up but not when the playlist was created. This fixes
that issue and refactors the AddPlaylist code
2018-01-14 11:24:45 +02:00
Vikram Ambrose fefea9de61 Disable drag of track items until this is properly implemented
Stop bad things from happening until proper DnD support of track
items has been implemented
2018-01-11 13:49:18 +02:00
Vikram Ambrose ae71d24f6e Ensure all nodes are shown when filter is cleared 2018-01-11 13:31:23 +02:00
Vikram Ambrose 3da938eac2 Add search filter to playlist list page
This allows power users who keep 100s of playlists to easily
find a playlist either by directory name, playlist name or by
searching for a song artist/title a playlist might contain
2018-01-11 13:11:13 +02:00
vikramambrose 2e4a67b8da Add appearance option to hide playlist filter toolbar (#5942)
Gives the user the option of a cleaner looking interface if the
filter toolbar isn't used.
2018-01-03 15:24:56 +00:00
droserasprout 08a80a5750 Fix oversized currenttrack icon in playlistview (#5885) 2017-10-18 00:32:25 +01:00
Allan Nordhøy 566708b778 ↑↓ for "Up" and "Down" (#5841) 2017-08-29 01:45:43 +02:00
Yan Pashkovsky 7bd0639455 fix up key in playlist (#5768) 2017-06-21 15:11:41 +01:00
Chocobozzz fc517ce7a5 Merge remote-tracking branch 'upstream/master' into qt5 2017-06-05 21:28:05 +02:00
Alex Bikadorov 8953227c65 New shortcut: remove current playing song from playlist (#5723) 2017-05-31 17:59:36 +01:00
Grace Dolphy bdda50b28f Continuation of "Seek instead of navigation with arrow keys" #5550, now allows up arrow key. (#5721)
* Continuation of "Seek instead of navigation with arrow keys" #5550, now allows up arrow key to not restart the song over when the library is in focus. Works as usuhal when playlist is in focus (song gets started over).

* Update playlistview.cpp

Added in the part that is responsible for seeking properly.
2017-05-30 18:19:08 +01:00
Grace Dolphy 52f1982353 Delete Undo Fix Attempt - Should Solve Issue #5701 Using Clementine to delete a song from disk should not be added to the undo stack (#5702)
* Fix delete functionality. Skips to next song if deleted song is also currently playing.

* Added in a bool to determine if the song being deleted is meant to be deleted from the disk or just from the playlist. Took advantage of the unused variable located in removeRows to distinguish between the two options. No longer adds delete from disk to the undo stack, and deleting from the playlist goes to undo stack as it should.

* Added in a bool to determine if the song being deleted is meant to be deleted from the disk or just from the playlist. Took advantage of the unused variable located in removeRows to distinguish between the two options. No longer adds delete from disk to the undo stack, and deleting from the playlist goes to undo stack as it should.

* Update mainwindow.cpp

* Formatting Changes

* Update playlist.cpp

Simplified condition statement.

* Added in a missed boolean for RemoveSelected

* Update playlistview.cpp
2017-04-18 14:29:25 +01:00
santigl a034c2d4d0 Remove non-allowed characters in playlist filename when saving. (Fixes #5460) 2017-03-16 15:18:02 +00:00
Florian Bigard 69b2a832db Merge branch 'master' into qt5 2017-01-18 15:57:07 +01:00
Santiago Gil 00c96f7334 Consider depth levels in path sorting (#5445) (#5573) 2016-12-31 13:22:10 +00:00
Mark Furneaux 589d641955 Fix playlist save on dialogs which do not enforce extensions (#5496)
like GTK+
2016-12-21 14:41:48 +00:00
Chocobozzz 18a89f78a9 Merge remote-tracking branch 'upstream/master' into qt5 2016-10-07 14:30:09 +02:00