Bug 476009 - Play count stored only in database and not written to files, so it gets reset to 0 every time you reset the database
Summary: Play count stored only in database and not written to files, so it gets reset...
Status: CONFIRMED
Alias: None
Product: Elisa
Classification: Applications
Component: general (show other bugs)
Version: 22.11.80
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Matthieu Gallien
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-23 15:15 UTC by Nate Graham
Modified: 2025-02-22 17:51 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2023-10-23 15:15:33 UTC
STEPS TO REPRODUCE
1. Find a song and look at its Metadata in Elisa. Take note of the Play Count value
2. Play a song until the end
3. Show the song's metadata again and see that the Play Count has increased by 1
4. Hamburger Menu -> Reset Database and Re-Scan Everything
5. Restart the app to be safe
6. Show the song's metadata again


OBSERVED RESULT
Play Count has been reset to 0.


EXPECTED RESULT
Play count is preserved because it was written to the file's own meatdata in the id3 "playcount" attribute, rather than only stored internally in Elisa's own database. To limit file writes, Elisa could maybe update the play counts only on quit, rather live. This would come at the expense of keeping an accurate tally when the app crashes or gets killed by something external, but maybe that's an acceptable price to pay.