Skip to main content


Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Modifying tags causes foo_playcount %added% tag to change (Read 578 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Modifying tags causes foo_playcount %added% tag to change

I'm not exactly sure when this behaviour started (possibly when I switched to foobar2000 v2.0?), but I've noticed that if I modify the %album% tag of an album, then %added% also changes to the date that I modified the tags - I assume because the database sees this as a new entry. Is there a way to disable/fix this?

I thought maybe the playback statistics database would've relied on another way of identifying a track/album instead of by the tags - perhaps by a hash or something like this?

I noticed a typo in an album title, and now %added% shows that the album was added to my library today, instead of back in 2018. I have an autoplaylist which organises my music by %added%, and this then gets messed up.

Re: Modifying tags causes foo_playcount %added% tag to change

Reply #1
Sounds like a bug, reported in bugs topic - see last quoted text / reply by Peter here.

Edit: Though supposedly it was addressed in Beta 21 -

Worked around ages old problem with external changes to file tags causing loss of foo_playcount data (needs new foo_playcount).

Maybe a new bug... Have you updated foo_playcount?

Re: Modifying tags causes foo_playcount %added% tag to change

Reply #2
I can confirm that this is happening with 2.0 beta 24 and foo_playcount 3.1.3.

Steps to reproduce:
1. Change the title of an album (%album%) in the media library (in this case I added "(Test)" to the end of the album name)
2. Playback Statistics field will show an Added date that reflects when you changed the album name.

Changing the album name back to its original value restores the correct playback statistics.

Re: Modifying tags causes foo_playcount %added% tag to change

Reply #3
Even stranger is that one of these files in question will show one date in the properties window of foobar2000 and another value in metadb.sqlite.

The value in foobar2000 properties dialog for this track's Playback Statistics "Added" date is 2023-01-28 14:52:27, while dateAdded in metadb.sqlite is 129732389459825045, which converts to 2012-02-09 05:29:05.

How come the value from metadb.sqlite is not being read by the Playback Statistics component? Am I missing something?

Re: Modifying tags causes foo_playcount %added% tag to change

Reply #4
Only native fb2k playback statistics from Beta1 - Beta17 were stored in a human readable format in metdab.sqlite. It's obsolete as of Beta18.

Using foo_playcount in Beta18 or later, that data *should* have been imported in to a new table but that data is serialised and totally unreadable.

Re: Modifying tags causes foo_playcount %added% tag to change

Reply #5
Thanks for pointing that out, Marc. I guess that puts an end to that. I used to be able to open the database with a SQL editor and fix these issues with the date added timestamp changing, but now I can't, it seems?

I suppose the solution is to stop using the 2.0 beta until this bug in the original post (if it is a bug) is addressed - if that does indeed happen.

Re: Modifying tags causes foo_playcount %added% tag to change

Reply #6
I forgot that it's still possible to use Library > Playback Statistics > Export statistics to get a XML copy of the playback statistics, which includes Added and AddedFriendly values. It's then fairly straightforward to adjust an added date by converting the AddedFriendly value to LDAP/FILETIME format.