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: Importing foo_playcount_custom statistics (Read 7581 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Importing foo_playcount_custom statistics

Hi,

I have used foobar2000 for a short time and have <LAST_PLAYED> etc as tags in certain files.  I think that this is due to the use of foo_playcount_custom plugin.

I have now moved to 0.9.5.3 and want to standardise on default plugins but I would also like to keep the statistics and somehow import them into foobar200.cfg.

For example, a track may have the following:
Code: [Select]
<FIRST_PLAYED>   2007-10-19 14:05:31
<LAST_PLAYED>    2007-10-19 14:36:45
<PLAY_COUNTER> 2


I want to be able to use something like:
Code: [Select]
[$select($day_of_month(%last_played%);,1st,2nd,3rd,4th,5th,6th,7th,8th,9th,10th,11th,12th,13th,14th,15th,16th,17th,18th,19th,20th,21t
h,22nd,23rd,24th,25th,26th,27th,28th,29th,30th,31st) $select($month(%last_played%),of January,of February,of March,of April,of May,of June,of July,of August,of September,of October,of November,of December), $year(%last_played%)] [ $time(%last_played%)]


to display last played time but obviously, I cannot do this if the stats are not in the config file.

Importing foo_playcount_custom statistics

Reply #1
First of all, a minor correction: the stats are stored by the default plugin in a "playcounts.db" file NOT in the cfg file.

To "convert" to the default plugin, why don't you:
1. transfer the custominfo tags into real tags first by using "Format Value from" in the properties dialog, and using "$cinfo(last_played)" (etc).
2. use the default plugin's "Import statistics from file tags" option.
3. clear the stats in the tags. The stats are in the db file, so you can do this without being afraid of losing stats.

Importing foo_playcount_custom statistics

Reply #2
Thanks for the quick response. If I understand you correctly, I select a file that has the <LAST_PLAYED> etc tags, right click and then select Properties. I then select <LAST_PLAYED>, right click again and then choose "Format from other Fields".

I then change Format to "$cinfo(last_played)"

I take it this means that I need the foo_custominfo plugin. Had difficulty finding it but found it here.

Just downloading and trying now.

[EDIT]

- Custom info is a not allowed plugin:
Quote
The following components are incompatible with this foobar2000 version and will function partially or incorrectly:
- foo_custominfo.dll : foo_custominfo
Please update these components to their latest versions if possible.


Is there anyway to do this without downgrading foobar, doing the changes and then upgrading again ?

[/EDIT]
I suppose I will also have to do a masstag to change %play_counter% to %play_count%.

Importing foo_playcount_custom statistics

Reply #3
I believe, that Playback Statistics can import %play_counter%, since it was oft used back in the days before the official component was released.

At least that was the case before it was updated to v2.0 . I can't imagine this functionality was dropped.
elevatorladylevitateme

Importing foo_playcount_custom statistics

Reply #4
Hi shakey_snake,

I have just removed <PLAY_COUNTER> : 2 from one of the files and created a custom column showing %play_count% and it shows 0

If I add a field PLAY_COUNT it shows correctly, so unless I am missing something, it would appear that it doesn't import automatically.

Importing foo_playcount_custom statistics

Reply #5
Interesting. Sorry about the mis-information.

And Thanks for testing it before nuking your entire library.

[edit] Hum... if you could, try that again, but try rescanning you media library first (found in the Library menu).


Your values are stored to the tags correct?
elevatorladylevitateme


Importing foo_playcount_custom statistics

Reply #7
OK, so I've tried it, and doing what I said above works.

Also, invoking the context menu item "Import Statistics from File Tags " correctly migrates %play_counter% to %play_count%.

However, all my %added% values are dated today, rather than going by the earlier %first_played% tag as it is supposed to.

[edit] Nevermind, a restart seems to have fixed it, awesome.
elevatorladylevitateme

Importing foo_playcount_custom statistics

Reply #8
More investigation.

I had foo_playback_custom and foo_playcount in the components directory (copied over from previous install).  If I remove both of them and restart fb2K my custom column for last played works.

If I then move foo_playcount back and do an import from file tags, it gets the info.  I then remove the file tags and everything is OK.

I then added foo_playback_custom as a test and it still works!

I will remove foo_playback_custom just now as it all seems to work.

Just need to play and create an auto playlist that gives me all of the tracks that have tags but are not in the database (if this is possible) (and probably also a not played one just in case)

Importing foo_playcount_custom statistics

Reply #9
Just need to play and create an auto playlist that gives me all of the tracks that have tags but are not in the database (if this is possible) (and probably also a not played one just in case)

Hum.. try this for an Album List view:
Code: [Select]
$ifequal($meta(first_played),%first_played%,IN DATABASE,NOT IN DB)|%album artist%|%album%|%tracknumber% %title%
elevatorladylevitateme

Importing foo_playcount_custom statistics

Reply #10
Thanks for that.  I need to try to remember to use Album List auto playlists rather than foo_autoplaylist playlists!

Any ideas on the not played autolist ?


 

Importing foo_playcount_custom statistics

Reply #13

Come on, now, that's too easy to be asking for.
Code: [Select]
play_count MISSING AND play_counter MISSING

So easy that I missed it completely.  Thank you very much.


Actually thinking about this, it is not exactly what I wanted.  I wanted to have an auto playlist that had songs which met the following (I think  )

1) play_count MISSING OR play_counter MISSING (shouldn't have both tags I guess)
2) LAST_PLAYED tag missing
3) no playcount or last played records in the database

If I use the above from shakey_snake, the auto playlist will never reduce as the play_count(er) is never added as a tag.

Importing foo_playcount_custom statistics

Reply #14
You know, you're right.

You have to use %% around %play_count% if you're NOT synchronizing the the tags with the playback stats. (Preferences -> Advanced ->Tools -> Playback Statistics) (I do, indecently)

However, As for #1, you're wrong.
AND is the correct logical operator because tracks that have never been played must have both the play_counter tag AND the %play_count% to be missing.
Just about every file is going to have one OR the other missing, making your query not helpful.

Of course, if all your files have had the "Import Statistics from File Tags" treatment, they are all going to have %play_count% (in the db) if they have (or had) a %play_counter% tag. Therefore, you could just simplify your query to
Code: [Select]
%play_count% MISSING
elevatorladylevitateme

Importing foo_playcount_custom statistics

Reply #15
Thanks once again.  It worked

BTW, do you ever get any issues with writing the tags as well ?