Bug 459985 - frequently played view not working or unclear on what statistic
Summary: frequently played view not working or unclear on what statistic
Alias: None
Product: Elisa
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Matthieu Gallien
Depends on:
Reported: 2022-10-04 19:32 UTC by kde.le2n5
Modified: 2023-01-11 22:40 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 23.04


Note You need to log in before you can comment on or make changes to this bug.
Description kde.le2n5 2022-10-04 19:32:07 UTC
Using the frequently played view on Elisa is showing some recently played files, but the history is very short. Playback from weeks ago is not showing. Also its not clear, where the "play count" is actually saved? 


View tracks of my library which have 0 plays show up when filtering for least frequently played first and not only tracks with play count = 1.
Also it show playback history from "forever", maybe there is a reason this "history" gets deleted, so transparency about how play count is actually used and where it is saved would be helpful.

Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

Comment 1 Jack Hill 2023-01-09 14:10:48 UTC
Seems like the Recently Played and Frequently Played views both display the same (incorrect) track list.
Comment 2 Jack Hill 2023-01-09 16:10:24 UTC
The problem is `computePreferredSortRole` setting `sortRole` to `TitleRole` because the list view is based on tracks (i.e. sorting by track title).

Workaround for now is to remove the function calls to `computePreferredSortRole` on lines 362 & 364 of viewmanager.cpp. I think these calls exist for future purposes when grid/list views are able to be set by the user (bug 411952).
Comment 3 Bug Janitor Service 2023-01-09 17:00:26 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/406
Comment 4 Jack Hill 2023-01-11 18:03:25 UTC
Git commit c266d7097f4996920c658a4d8732b2f8e949b926 by Jack Hill.
Committed on 11/01/2023 at 17:11.
Pushed by ngraham into branch 'master'.

Sort the "Frequently Played" view based on the play count of each track

Previously was using a formula that prioritised recently played tracks.
This meant you could have a track with 8 plays being displayed higher
than a track with 10 plays.

Now the view only sorts tracked based on the play count of each track.

M  +1    -12   src/databaseinterface.cpp
M  +0    -1    src/datatypes.h
M  +0    -4    src/models/editabletrackmetadatamodel.cpp
M  +0    -2    src/models/trackmetadatamodel.cpp
M  +1    -1    src/viewmanager.cpp
M  +2    -2    src/viewslistdata.cpp