HydrogenAudio

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: JohnTravolski on 2019-04-14 06:46:45

Title: Playback Statistics Component Questions
Post by: JohnTravolski on 2019-04-14 06:46:45
I just started using Playback Statistics, but I have a few questions that the wiki was unable to answer for me:
http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components_0.9/Playback_Statistics_(foo_playcount)

1. What is the criteria for a song being counted as "a play"?  Does it have to be played all the way through, halfway, 90%, etc?
2. Suppose I change some of the tags of an audio file with an external application (not Foobar2000).  Since the statistics are determined using some of the tags, if I change them with an external application, Playback Statistics would have no way to know about it unless I tell it manually, somehow.  How can I recover the playback statistics for that track?  I tried looking through the exported XML file, but it appears the identifying information is hashed, so I can't recover it that way.
3. Is the playback statistics data stored somewhere in %appdata%?  What is the exact filepath where the stats are stored?

I would really appreciate if all my questions can be answered.  @Peter?  Thank you very much.
Title: Re: Playback Statistics Component Questions
Post by: Daeron on 2019-04-14 07:48:42
Better link:
https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components/Playback_Statistics_v3.x_(foo_playcount)

1. One minute playback time or the track completely played.
2. The tracked tags are: artist + album + disc number + track number + track title.

If the external edit happens while foobar is not running, I would expect it not detecting that it's the same file. If foobar is running and actively monitoring that folder, you might have a shot, but I have not tested either scenario. You can do that yourself with a dummy file.

In any case playback statistics are kept up to 4 weeks since the track was last seen so you don't immediately lose them.

You already found the export option. You can use it on a subset of tracks to back up the data. Then you can apply it on the "new" files.

I believe the actual database is at 'foobar2000/index-data/C653739F-14B3-4EF2-819B-A3E2883230AE', but you shouldn't mess with it directly.

If you have further questions it's possible they were answered here:
https://hydrogenaud.io/index.php/topic,82420.0.html
Title: Re: Playback Statistics Component Questions
Post by: anamorphic on 2019-04-14 12:55:58
Better link:
LINK (https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components/Playback_Statistics_v3.x_(foo_playcount)) ;)

(The wiki redirects from the same link they posted, meanwhile the forum leaves out the closing bracket)

2. Since the statistics are determined using some of the tags, if I change them with an external application, Playback Statistics would have no way to know about it unless I tell it manually, somehow.  How can I recover the playback statistics for that track?
I think you would have to undo the changes back to what PS is expecting, which recovers the stats, and redo the tag changes within foobar.

I had to do this once when I changed a %date% on another PC and replaced the files - put it back to what it was, stats thankfully returned, then re-tag.

3. Is the playback statistics data stored somewhere in %appdata%?  What is the exact filepath where the stats are stored?
It depends on whether a portable installation. If not the install folder, the config folder - (hold shift key) File menu > Browse configuration folder. Then as mentioned, 'index-data' (etc...)

Cheers
Title: Re: Playback Statistics Component Questions
Post by: JohnTravolski on 2019-04-15 01:22:36
Thanks for the information.  However, for my second question, I understand that I would have to use Foobar2000 to change the tags to preserve the statistics, but I want to know what steps I can take to recover that information if I were to change the tags with an external application.

My point is that I would be unable to edit the exported XML file directly since I can't know which stats correspond to which track (since the identifying information is hashed), so I don't know which information to copy to the new entry that appears when a track's tag changes.

Does anybody know how to reverse the hash back into to identifying information?

(https://i.imgur.com/T8UEp9H.png)
Title: Re: Playback Statistics Component Questions
Post by: Awesomeo on 2019-04-15 10:48:11
They are sorted exactly in the same order as on the playlist you exported them from.

So you can basically load your whole music library alphabetically on a playlist, export the stats to xml, open them as a spreadsheet and then just copy artist/album/nn/title/whatever to new columns beside:

(https://ptpimg.me/kbub22.jpg)
Title: Re: Playback Statistics Component Questions
Post by: JohnTravolski on 2019-05-04 08:21:28
They are sorted exactly in the same order as on the playlist you exported them from.

So you can basically load your whole music library alphabetically on a playlist, export the stats to xml, open them as a spreadsheet and then just copy artist/album/nn/title/whatever to new columns beside:


I'm not entirely sure that's correct.  Take this example:

(https://i.imgur.com/W7om4Sr.png)

You can see that, in the plays column on the far right in Foobar, the numbers don't seem to match up with the values in the XML file.  I am using Facets to display the media library, however (it is displaying all of the tracks, with custom sorting), so I'm not sure if that may have something to do with it.