Skip to main content

Notice

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: 1.4.2 Internal playback statistics cleared on play with write to file enabled... (Read 3436 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

1.4.2 Internal playback statistics cleared on play with write to file enabled...

I'm not sure when this started but I noticed two days ago that both last_played_timestamp and play_count are being set to N/A and 0 respectively while playing a song.

The song could have 23 plays or 300+ the result is the same, about one minute into playback, while its writing the updates to the song file, the internal database for foobar gets reset.

Right clicking and importing from file tags shows correct data, the play_count value was incremented by one and the last_played_timestamp is correct.

Disabling the write to file tags does work in that foobars data is correctly incremented and updated but then the file tags, which I use in other applications, is no longer up to date.

foobar2000 - v1.4.2
audioscrobbler - 1.4.7
Playback Statistics - 3.0.2

I used to have Enhanced Playback Statistics installed but in a bid to fix this have currently removed it.

Console log only shows
Code: [Select]
Opening track for playback: "\\storage\music\Full Albums\Neil Young\Greatest Hits\14 Neil Young & Crazy Horse - Hey Hey, My My (Into the Black).mp3"
Reopening played file after update: "\\storage\music\Full Albums\Neil Young\Greatest Hits\14 Neil Young & Crazy Horse - Hey Hey, My My (Into the Black).mp3" @ 1:17.310454

Re: 1.4.2 Internal playback statistics cleared on play with write to file enabled...

Reply #1
I don't see this behavior. When tag sync is enabled I get info from the internal database tagged to files, which means reset to single play for a file that didn't have its stats imported before or writing whatever the last internal database knew about the track. Internal stats always shows what got written to tags.

Re: 1.4.2 Internal playback statistics cleared on play with write to file enabled...

Reply #2
Post full list of your components please.
Microsoft Windows: We can't script here, this is bat country.

Re: 1.4.2 Internal playback statistics cleared on play with write to file enabled...

Reply #3
See attached.

Re: 1.4.2 Internal playback statistics cleared on play with write to file enabled...

Reply #4
Thanks for the details.

If you play the same file again, does the information update properly or disappear again?

If you make any tag edits on these files, such as comment tags, does the playback statistics info disappear also, or just on tag updates triggered by playback statistics update?
Microsoft Windows: We can't script here, this is bat country.

Re: 1.4.2 Internal playback statistics cleared on play with write to file enabled...

Reply #5
I can edit the data and everything gets written just fine. It's only play_count and last_played_timestamp that are reset within foobar on playback stats update.

I went back and played a couple of songs that I knew I had been running into this issue with and oddly they're updating just fine once again. A couple days ago I would play them and the 2 tags would reset everytime until I import from file tags, now when I play them they update correctly.

I'll keep an eye on things and update this post if it starts up again. Do you happen to know if theres any sort of hidden debug logging in the system that we may be able to turn on? It would be great to see what its trying to do, or thinks its doing when this happens again.

Re: 1.4.2 Internal playback statistics cleared on play with write to file enabled...

Reply #6
New version of the component for you to test-
https://www.foobar2000.org/temp/foo_playcount_beta.fb2k-component

A specific workaround for this issue has been added.
Microsoft Windows: We can't script here, this is bat country.

Re: 1.4.2 Internal playback statistics cleared on play with write to file enabled...

Reply #7
Any chance this workaround involves the option to update the play count after the song plays?
Processed audio in java and python.

Re: 1.4.2 Internal playback statistics cleared on play with write to file enabled...

Reply #8
Installed this morning and so far no issues, I tried a bunch of random files that I think were also having issues and those updated just fine.

Re: 1.4.2 Internal playback statistics cleared on play with write to file enabled...

Reply #9
Now released, please get 3.0.3 from the website.

Thanks to whoever got the 3.0.3 beta above to crash in "copy statistics" and autosubmitted the report, regression fixed in 3.0.3 stable.

Any chance this workaround involves the option to update the play count after the song plays?
Nope, but feature request noted for a future update.
Microsoft Windows: We can't script here, this is bat country.

Re: 1.4.2 Internal playback statistics cleared on play with write to file enabled...

Reply #10
Perhaps this is not strictly playback stats fault. I was listening to some albums and kept a close eye and all the stats were indeed updating properly.

I came across this album that had an incorrect artist tag. I selected all items in the album, opened the properties and corrected the tag. Instantly the play_count and last_added_timestamp were set to 0 and N/A on all items edited. I right clicked and imported stats and its all back. I played 1 song to double check playback stats is infact working correctly and it is.

I did not play this song file yet, is it of any help in figuring out whats going on? Perhaps its a tag format issue? I'm not sure how it all works.

Re: 1.4.2 Internal playback statistics cleared on play with write to file enabled...

Reply #11
Peter, does it also make sense to synchronize statistics with NTFS Streams? In this case, there is no need to overwrite files, if I'm not mistaken?

Re: 1.4.2 Internal playback statistics cleared on play with write to file enabled...

Reply #12
Files need to be overwritten, depending on whether their tags are padded, since a lot of formats store tags in the front of the file, and adding or modifying tags could result in a tag block expansion, requiring a full rewrite of the file.

 

Re: 1.4.2 Internal playback statistics cleared on play with write to file enabled...

Reply #13
Nope, but feature request noted for a future update.
Thank you very much for putting it on there.
I'm trying to remember if values stored to the file override what's in the database or not.

Being able to update the play count after the song plays, would fix my song pausing during play issue.
Processed audio in java and python.