-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "Last Played" column to library #2670
Conversation
…st played time for every track. https://bugs.launchpad.net/mixxx/+bug/1490818 This initial version doesn't respond to changes in the playlist, but it does do the initial population at startup.
Also, bindValue isn't work for some reason. I'll try it again but it keeps saying "parameter count mismatch" even though everything looks right. |
pushed a change that tries to use bindValue but it fails. Can't figure out why, but the prepare statement seems to be returning false |
VIEWs can't use params.
ok bindvalue works now |
Build fails:
|
It works, cool! I'll let others review the implementation details. |
Split lastplayed helpers into two separate objects, one to create the table and the other to read from it. They are used by different parts of the code and need access to different things.
Fixed an issue where deleting a playlist did not correctly update the tables. I also did a drive-by change to the trackdeleted signal, which had a "position" parameter that was never used. |
@@ -88,7 +88,7 @@ void BaseSqlTableModel::initSortColumnMapping() { | |||
m_columnIndexBySortColumnId[TrackModel::SortColumnId::SORTCOLUMN_DATETIMEADDED] = fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_DATETIMEADDED); | |||
m_columnIndexBySortColumnId | |||
[TrackModel::SortColumnId::SORTCOLUMN_LASTPLAYEDDATETIME] = | |||
fieldIndex(ColumnCache::COLUMN_LASTPLAYED_DATETIMEPLAYED); | |||
fieldIndex(ColumnCache::COLUMN_LIBRARYTABLE_DATETIMEPLAYED); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commits in the history that do not even build are bad for git bisect. Redo and force push.
obsoleted by #3140 |
https://bugs.launchpad.net/mixxx/+bug/1490818
This adds an artificial column (the product of a simple TEMPORARY VIEW query) that reports the last time a track was played according to the history playlists.
This mostly works, except if I delete an old history playlist sometimes the library view is slow to show the updated values.