Commit Graph

206 Commits

Author SHA1 Message Date
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
Mark Furneaux d28a318437 Clang format 2018-04-14 16:57:06 -04:00
Mark Furneaux 3626d84964 Add play next from library 2018-03-18 22:44:00 -04: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
Santiago Gil 00c96f7334 Consider depth levels in path sorting (#5445) (#5573) 2016-12-31 13:22:10 +00:00
Ilya Selyuminov d9b3a9302a Update playlist virtual order after sorting (#5436) (#5466) 2016-08-26 08:59:26 -05:00
santigl 9ddd630b3b Ignore case in path comparison (#5445) 2016-07-24 16:15:59 -03:00
John Maguire a9ba0f3bf2 Filter out bad wikipedia images better and support other locales better.
#5416
2016-06-28 16:28:20 +01:00
Alex 11670e1760 Fix playlist behaviour (#5330)
* Do not restore playback state on application start if overwritten by command line options

This also fixes unwanted pausing if a new instance is started with commandline URL combined with playback restore.
Note that the actual buggy code (MainWindow::ResumePlayback()) is not fixed here.

* Fix for commandline URLs for new instances are always appended to playlist.
2016-04-12 15:53:43 +01:00
Victor Dodon 5b066991ab playlist: call InformOfCurrentSongChange only after updating the virtual index
Calling InformOfCurrentSongChange before updating the virtual index results in
sending the CanGoNext and CanGoPrevious notifications with the wrong values.
2016-03-10 21:20:53 +00:00
Chocobozzz 5675091816 Add error message if editing tag from playlist fails 2015-12-20 19:07:15 +01:00
John Maguire f300946c81 Remove most usages of QFutureWatcher 2015-11-27 14:28:12 +00:00
John Maguire 3cc9c1e446 Remove ModelFutureWatcher 2015-11-26 19:02:08 +00:00
Mark Furneaux 9b42ee50ef Set next track as current when removing tracks
Fixes #5031
Attempt to set the song after the deleted tracks as the current so that they will play next rather than the beginning of the playlist.
2015-11-23 01:48:48 -05:00
Santi 5518dc8250 make format 2015-08-01 14:45:04 -03:00
Santi 975b277bdb Sort by album considers discs and tracks 2015-07-31 21:38:06 -03:00
Eduardo Sánchez Muñoz acef48df5d Support showing original year tag on the playlist. 2015-06-30 19:25:38 +02:00
Mark Furneaux f4b7c22bc2 Revert "Revert "Add track intro mode""
This reverts commit ece262f7f4.
2015-06-15 16:27:40 -04:00
John Maguire ece262f7f4 Revert "Add track intro mode" 2015-06-15 15:49:08 -04:00
Mark Furneaux b57cebbf2d Add track intro mode
This repeat mode plays the beginning of each track, good for quickly getting a feel for a new album for example.
2015-06-14 13:32:58 -04:00
kiselev-dv f7ebeb53da Stop after each track 2015-05-22 18:11:58 +05:00
John Maguire e899598967 Revert "Add stop after each song repeat mode" 2015-05-22 11:33:59 +01:00
John Maguire 06f053e5a6 Merge pull request #4850 from kiselev-dv/master
Add stop after each song repeat mode
2015-05-22 11:29:48 +01:00
kiselev-dv aba271ed6a format code 2015-05-20 17:34:37 +05:00
Mark Furneaux fde8ae0f30 Add constants and variable units
Scrobble point constants are now defined as the minimum and maximum time last.fm requires for a scrobble to be valid.
2015-05-18 13:22:55 -04:00
Mark Furneaux 99dffe216c Fix Last.fm scrobbling after seek
Fixes #4836
Last.fm defines a scrobble should be sent if:
-the track is longer than 30 seconds.
-the track has been played for at least half its duration, or for 4 minutes (whichever occurs earlier.)

Clementine has treated this as seconds from the start of the track, and if any seeking occurs, it nullifies the scrobble.
This IMO is incorrect. If I skip the first 10 seconds of a song, but listen to the rest (still meeting the time requirements),
I should still be able to scrobble the play. This change moves the scrobble point with every seek, requiring continuous playback
from any point that satisfies the time criteria.
2015-05-18 12:53:07 -04:00
kiselev-dv 864d4162d3 Add stop after each song repeat mode 2015-05-12 14:05:46 +05:00
Mark Furneaux c4daa227a7 Do not remove currently playing track when repopulating a dynamic playlist 2014-12-27 20:34:29 -05:00
Krzysztof Sobiecki fa9ea6ec5f Fix compilation with moved files in internet/ 2014-12-18 23:35:21 +01:00
Simeon Bird 09e839353e Speed up playlist restoring by moving sqlite query off main thread
The playlist fetching uses QtConcurrent to make the playlist on a
different thread (possibly concurrently for each item).
However, profiling reveals that the slow operation is fetching
the rows from the SQLite database, making this redundant.

Instead move the whole playlist loading, including the database access,
into a single function, and call that function in a different thread via
QtConcurrent::run.

This has the side effect of moving all the concurrent stuff from
PlaylistBackend into the callers.

kstartperf measures:

Before: 7.5s cold
        3.6 s warm

After: ~4.0 s cold
       3.5 s warm
2014-12-09 12:47:37 -05:00
Juan Luis Boya García 292fff7e3a Fix #4420: Previous track in dynamic random mix 2014-11-29 19:34:31 +01:00
Arnaud Bienner 7ac9e4c6d1 Fix a bug in InsertItems functions that makes Cdda tracks to not be saved/restored correctly when restarting Clementine 2014-10-26 17:08:12 +01:00
Arnaud Bienner dc0d3436c8 Finish CD integration update to Gstreamer 1.0
Move everything related to CDDA to a seperate class, so we can more easily reuse it in SongLoader
2014-10-26 03:32:37 +01:00
Arnaud Bienner c35e573637 Missing things from previous commit 2014-10-07 00:29:46 +02:00
Arnaud Bienner f6e6d3b937 Revert "Finished the changes to the quick change menu. Everything should work."
This reverts commit a468085c3a.

Conflicts:
	src/playlist/playlistcontainer.cpp
	src/playlist/playlistcontainer.h
	src/ui/behavioursettingspage.cpp
2014-10-07 00:29:46 +02:00
ppkt 43a6740b48 Remove unavailable items from playlist 2014-08-24 10:44:27 +02:00
Gavin Howard f41bebbeb2 Ran 'make format' on my patch. 2014-08-18 09:56:01 -06:00
Gavin Howard a468085c3a Finished the changes to the quick change menu. Everything should work. 2014-08-15 18:52:01 -06:00
Helder Martins e4054fad5e Clarified comment to be more accurate of what it does 2014-08-03 10:48:01 +01:00
Helder Martins 56fc242520 complemented condition inside reshuffleindices function to take into account the selected track 2014-07-27 23:07:50 +01:00
Helder Martins 0c2d4e9f1c Fixed a minor issue where the playlist wasnt updating the queue order, when a track was dequeued using the ctrl-d shortcut 2014-07-23 00:15:06 +01:00
David Sansome c8625deffb Update persistent model indexes properly when sorting the playlist. Fixes #4358 2014-06-07 13:31:25 +10:00
David Sansome 53be1e1f65 Revert "Use guaranteed random number generator." Fixes #4400
This reverts commit 9f6899ac82.
2014-06-07 12:12:08 +10:00
Arnaud Bienner 134b617ec4 Emit dataChanged when changing skip track state.
Otherwise, when changing this for the currently playing track, the "strike out" change wasn't visible.
2014-05-25 18:44:54 +02:00
John Maguire 9f6899ac82 Use guaranteed random number generator.
Fixes #4352
2014-05-20 17:03:04 +02:00
John Maguire 24a4cff807 Merge pull request #4288 from sundrythoughts/rating-optimization
Increase performance of mass rating changes.
2014-05-20 12:42:39 +01:00
Mark Furneaux d0ca2cef6c Comment remove 2014-04-25 23:02:42 -04:00
Mark Furneaux ce8b7303c0 Formatting 2014-04-25 22:50:52 -04:00
Mark Furneaux c890af6306 More elegant solution to last commit
set_current_row now takes optional parameter "is_stopping" for when auto stop
is enabled.
2014-04-25 22:45:25 -04:00