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: Playback Statistics component: version 3.0.1 (Read 204532 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

Re: Playback Statistics component: version 3.0.1

Reply #425
Newly released foobar2000 v1.5.1 includes an attempted workaround - will wait and try again to open files if someone has them locked.
Microsoft Windows: We can't script here, this is bat country.

Re: Playback Statistics component: version 3.0.1

Reply #426
It should be retagging once. That file was really short (just over a minute) so it might've bugged out. I'll try to remember to check a "Normal" length track. I tried playing that short track like 10 times after that to get it to fail again but it wouldn't lol. I hate it when issues are hard to reproduce on demand


the lastfm thing doesn't touch the file. Autosave is AFTER every track  cuz i'm paranoid AF  due to a major incident in 2012, but it looks like it autosaves just after the next track actually starts. autosave is done in seconds tho, well before the decoding interruption so I don't think it's related to that either.

I got a procmon log but I have no idea how to grab the relevant info.  the issue started happening A LOT more t his week (4 times in the last day alone) so I had been monitoring it pretty close.


I'll try 1.5.1! much appreciated. Happy New Year!

Re: Playback Statistics component: version 3.0.1

Reply #427
I forgot to post back but that resolved this specific issue. Thank you

Re: Playback Statistics component: version 3.0.1

Reply #428
Can you update %played_per_day% of foo_playcount to support more decimal fraction?
I'm an old foobar user since 2007,
and now a lot songs showing only 0.01 or 0.02, with time gone by more songs will drop to 0.01 and 0.02.
with more decimal fraction it'll make it useful like before.

thx.

Re: Playback Statistics component: version 3.0.1

Reply #429
I cannot find the statistic db.  :o

I read it was in the index-data folder but all I have are two files:
95BB7E22-F4F4-453F-8AD0-A4AC6068B4BB
C653739F-14B3-4EF2-819B-A3E2883230AE



Also, an option in the advanced settings for writing newer added dates from tags would be great.

Here's a JavaScript thingy to convert dates to 64 bit and back again for anyone that wants this. You can paste this code to a file with a .js file extension and open it in sublime text and build it.

The console with show you the results.
Code: [Select]
// Convert 64 bit to date.
var mytime = 131494331251080321;
var date = new Date((mytime-116444736000000000)/10000);

Date.prototype.yyyymmddhhmmss = function() {
var yyyy = this.getFullYear().toString();
var mm = (this.getMonth()+1).toString(); // getMonth() is zero-based
var dd = this.getDate().toString();
var hh = this.getHours().toString();
var min = this.getMinutes().toString();
var ss = this.getSeconds().toString();
return yyyy + '-' + (mm[1]?mm:"0"+mm[0]) + '-' + (dd[1]?dd:"0"+dd[0]) + ' ' + (hh[1]?hh:"0"+hh[0]) + ':' + (min[1]?min:"0"+min[0]) + ':' + (ss[1]?ss:"0"+ss[0]);
};
var dateConverted = date.yyyymmddhhmmss();
console.log(dateConverted);

// Convert date to 64 bit.
// var mytime = dateConverted;
var mytime = '2017-06-28 19:27:00';
var time = ((new Date(mytime)).getTime() * 10000) + 116444736000000000
console.log(time);

Re: Playback Statistics component: version 3.0.1

Reply #430
Hello, I would like to request a feature to merge track statistics.
 I have some songs that are almost the same but with different tags(Same artist, same title, everything else different) and i want them to be treated like if they were the same, there should an option where when you select 2 or more songs to merge them.
The track with the older Added date one should be kept, First played, also the older and Last played the last date, the Plays should be added together.
Also after merging, both tracks should be treated like if they were the same(If i play track 1, track 2 also gets updated).

Re: Playback Statistics component: version 3.0.1

Reply #431
Is there any way to change the polling rate at which this scans new items? If I drag an album into FB and then move to the collection folder then not all tracks have the same import time. Using the latest FB and this plugin. 

Re: Playback Statistics component: version 3.0.1

Reply #432
I removed the component sometime ago, but today I installed the latest version (3.0.4) in order to test a spider monkey panel script, which you can read about in this topic.
Testing the script, I realized that when I update the rating via the playback statistics context-menu, the component tries to update both the selected file and a ghost file with the same name and path, but on a different drive that does not exist and that I never had on my pc. So for example:

I:\Musica\ROCK\13 - ALTERNATIVE\NOISE\Brainiac\1995 - Internationale\Brainiac - Internationale - 02 - Silver Iodine.mp3
D:\Musica\ROCK\13 - ALTERNATIVE\NOISE ROCK\Brainiac\1995 - Internationale\Brainiac - Internationale - 02 - Silver Iodine.mp3

My actual library is on the drive mapped as "D", never went further than F since I own a pc. I tried removing the index-data files and the configuration file, but the problem persists. This is really weird. What is wrong?
I'm late

Re: Playback Statistics component: version 3.0.1

Reply #433
That looks weird. The program updates statistics for all files with the same track - title - artist as you know so that points to your problem.

Quote
Playback statistics are now pinned to a combination of artist + album + disc number + track number + track title information, contrary to pre-3.0 versions which would pin data to file paths.

For ex. just checked with my own files and after playing this track it updates the 2 "copies" of the track I have, even if they are different physical files.
[01:36:26] H:\Musica_CD\Deep Purple\Made in Europe {1990 UK 1st EMI CDP 7 93796 2}\01 - Burn.flac
[01:36:26] H:\Musica_CD\Deep Purple\Made in Europe {1999 RUS 1st CD-Maximum CDM 0299-231}\01 - Burn.flac

At some point you loaded things from I:\ and that's why the library has 2 instances of the same song.
Now, wether that's a bug on foobar or your PC.. who knows. Drive letters sometimes change due to errors or changing boot priority, and you may have loaded foobar with D: being I: some day (?).

Quote
Playback statistics data is no longer dropped when the tracks are removed from the media library. A record gets removed when no matching track has been seen by foobar2000 (in Media Library or in any playlist or in an imported XML backup of playback statistics) for four weeks.

Also the component uses it's own database.

Re: Playback Statistics component: version 3.0.1

Reply #434
That looks weird.
[...]
Also the component uses it's own database.

It looks even weirder because the components' database, as far as I know, is stored as an index-data file. So I tried removing the index-data file (al index-data files actually, just to make sure I was removing the right one) and reinstalling the component, but the ghost doppelganger tracks were still targeted by the rating command.
I'm late

Re: Playback Statistics component: version 3.0.1

Reply #435
If you're getting the path to the "invalid" item from a script callback like on_metadb_changed, fb2k thinks it exists somewhere. It's either in your library or a playlist. Use

%path% HAS I:\

to find them (Library>Search or Edit>Search for the active playlist).

Of course you could knock up a script that checks all playlists in one go.

Re: Playback Statistics component: version 3.0.1

Reply #436
Thanks, I found the culprit playlist with a script. After reviving dead items the problem is gone.
I'm late

Re: Playback Statistics component: version 3.0.1

Reply #437
Seems like foobar2000 v1.6? introduced an issue with foo_playcount where, after pausing playback for a track that's already had its playcount increased by one, closing foobar2000 (and at least as far as I can tell), shutting down the machine, turning it back on, reopening foobar2000, then resuming the track, the playcount goes up by one again.  This is despite "Save playback state when closing foobar2000 and resume on next startup" being checked under Preferences -> Playback.

@Peter not sure whether it's an issue with the component or foobar2000 itself. Tested with 1.6.4.

Re: Playback Statistics component: version 3.0.1

Reply #438
I've been using Playback Statistics to rate my music. I replaced a bunch of mp3s in a folder with a bunch of flac files, and I noticed that all of the ratings remained. Is this supposed to happen?

How are music ratings stored? Are ratings attached to song title (or something else) rather than the song file?

Re: Playback Statistics component: version 3.0.1

Reply #439
Playback Statistics stores information in a database, tied to a configurable range of metadata fields which, by default, do not include the codec or format of the file.

Re: Playback Statistics component: version 3.0.1

Reply #440
Thanks for the info! Just curious, how would I change what metadata it uses?

I looked in Preferences >> Advanced and couldn't find anything (other than a checkbox for syncing). Where are the settings for Playback Statistics?


Re: Playback Statistics component: version 3.0.1

Reply #442
@tigershark , Playback statistics are now (from version 3.0) pinned to a combination of artist + album + disc number + track number + track title (taken from https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components/Playback_Statistics_v3.x_(foo_playcount) )

You can't change which metadata tags it uses.

This is useful info! Thanks for sharing!

Re: Playback Statistics component: version 3.0.1

Reply #443
@tigershark , Playback statistics are now (from version 3.0) pinned to a combination of artist + album + disc number + track number + track title (taken from https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components/Playback_Statistics_v3.x_(foo_playcount) )

You can't change which metadata tags it uses.
Sorry, here's the correct link - Playback_Statistics_v3 (foo_playcount)

Re: Playback Statistics component: version 3.0.1

Reply #444
Hey all! I have a large library that I once used with foobar, lost my foobar setup due to a windows issue, and moved to iTunes (all a decade ago.). I'm now trying to get my library in order again and make the slow transition into making FB how I like it. I have figured out how to combine both the original foo_playcount tag and the iTunes play counts together. I have 2 columns set up right now before I do a masstager script run for 20k files. One for the old foobar play counts and one for the iTunes play counts.

When I preview the script, it shows the combined total of both, which I would then write into the old %play_count% tag, since that's the tag that would then be constantly updated in foobar. I decided to go ahead and install foo_playcount before I did all of that, and after restarting, all of the old foobar play counts disappeared. They're still in the id3v2 info, but it seems the plugin has hidden them (in the column it's now listed as 0 play counts) and doesn't update the old %play_count% tag. I saw it update a song to 1 play but nothing shows in the id3 now. Looking at previous posts it's in a database now it looks like. So it seems my original plan is dead for now. Any ideas?

tldr; Is there a way to convert the old foo_playcount %play_count% tags into whatever it currently uses to store that information?



Re: Playback Statistics component: version 3.0.1

Reply #446
Appreciate the info marc, I failed to RTFM. I have tried digging up information on the issue I am currently having, and everything I've tried so far has been for naught. I'm attempting to use masstager to add what I have in $meta(play_count) with the database version of %play_count% and it hasn't worked, it's just written the info to the file itself, not the db.

Edit: As soon as I post this I figured it out. Right clicking on the song selection(s) and going to Playback Statistics / Import statistics from file tags copied my combined play counts from foobar/iTunes into the newer used play_count database.


Re: Playback Statistics component: version 3.0.1

Reply #448
Hello. I want to export all my ratings to the files but I don't want them on the RATING tag but on the RATING WMP tag or even the POPULARIMETER tag to also include the play count. Is there a way to do this?
Thanks

Re: Playback Statistics component: version 3.0.1

Reply #449
right click a playlist/library selection>Playback Statistics>Import statistics from file tags.
Thank you for sharing this! I have no idea how I missed something this obvious, but I've spent a good hour searching for a way to do this before I stumbled across your post :-D

It would be nice to be able to automate this process, though. I am not a big fan of relying on databases to store manual data, like rating. Don't want to have any risk of losing information if I move files around, change computer, or simply update tags for whatever reason. I prefer all changes written to file tags.

However, I also get the idea that writing to file while playing the file might be not ideal in some instances.
It would be great to have an option like: "Sync database and file tags on application exit". This way, the database would always be backed up to file tags automatically without any noticeable performance hit (since foobar2000 could close the GUI just as fast as it does now, and take however much time it needs to write out to files in the background). Also, if anything goes wrong, worst case scenario is user losing playback statistics of just one session, not of entire time of all media library!