last played column

Bug #1490818 reported by naught101
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Committed
Wishlist
Owen Williams

Bug Description

Could we have a "last played" column in the library? Just with the date and time of last play.

Tags: easy library
Changed in mixxx:
assignee: nobody → Milos Zivlak (zivlakmilos2)
assignee: Milos Zivlak (zivlakmilos2) → nobody
Changed in mixxx:
assignee: nobody → Milos Zivlak (zivlakmilos2)
Changed in mixxx:
status: New → In Progress
Changed in mixxx:
status: In Progress → Fix Committed
Changed in mixxx:
status: Fix Committed → In Progress
Revision history for this message
Daniel Schürmann (daschuer) wrote :
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Due to lack of progress, marking Triaged and clearing assignee. Feel free to revert if it is in fact still in progress :).

Changed in mixxx:
importance: Undecided → Wishlist
assignee: Milos Zivlak (zivlakmilos2) → nobody
status: In Progress → Triaged
Revision history for this message
Owen Williams (ywwg) wrote :

I might resurrect this (for 2.4), it would be super useful to sort a crate by "last time played"

Revision history for this message
Owen Williams (ywwg) wrote :

so after reading the discussion on the pull request, it sounds like:

* on startup, we blast through the history playlists and build a temporary table of track id and last played time
* when building the basetrackcache (?), we get last played times from that table and pair it with the rest of the data for the track so that I can have a TrackPointer->getLastPlayedTime call
* when a history playlist is updated, we update the temporary table and base track cache

creating the last played table is quick and easy:

SELECT
  track_id,
  MAX(pl_datetime_added)
FROM
  PlaylistTracks
WHERE pl_datetime_added != ""
GROUP BY
  track_id
;

Regenerating values for updated trackids is similarly super fast, so we don't need to have any complex logic -- the db does all the work.

I'm not sure how to join the temporary last-played table with the base track cache though. It looks like the last played time should be in track.h somewhere? Or do I have to do a custom in-memory table for the whole library and every crate? I forget how data is set up so it populates the views.

Revision history for this message
Owen Williams (ywwg) wrote :

Should it be part of the library_cache_view created in mixxxlibraryfeature.cpp?

Changed in mixxx:
status: Triaged → In Progress
assignee: nobody → Owen Williams (ywwg)
Revision history for this message
Be (be.ing) wrote :

Launchpad isn't a great medium for in depth discussion. Do you want to start a Zulip topic on this?

I'm wondering if it might be a good idea to explicitly track each timestamp a track is played in the database.

Revision history for this message
Owen Williams (ywwg) wrote :

huh, somehow it works automatically! good enough I guess.

Revision history for this message
Owen Williams (ywwg) wrote :

One thing I don't like about Zulip is that discussions and decisions disappear in the noise, whereas bugs and PRs are more easily referenced, bookmarked, and tracked.

We already record each timestamp in the history playlists so that information already exists. I'm not sure how that affects this specific feature request.

Revision history for this message
Owen Williams (ywwg) wrote :
Changed in mixxx:
milestone: none → 2.4.0
Revision history for this message
Be (be.ing) wrote :
Changed in mixxx:
status: In Progress → Fix Committed
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/8211

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.