HydrogenAudio

Hosted Forums => foobar2000 => 3rd Party Plugins - (fb2k) => Topic started by: tboehrer on 2004-04-13 16:58:02

Title: Play Counter
Post by: tboehrer on 2004-04-13 16:58:02
Here is a small plugin that will update the DB with a running playcount, along with the date and timestamp a track was last played.  It currently only updates the DB (not the file).

The following tags are updated:

PLAY_COUNTER = A counter that is incremented each play

PLAY_DATE = the date last played, format DDMMYY

PLAY_TIME = the time last played, format HHMMSS

Play Counter (binary) (http://65.17.81.165/foobar/foo_playcount.dll)
Play Counter (source) (http://65.17.81.165/foobar/foo_playcount.zip)
Title: Play Counter
Post by: brainzelda on 2004-04-13 20:57:28
Wow this is great. Simple yet useful. Already added it to my playlist formatting and it updates perfectly. Maybe in the next version you can add an option to update only when you finish a song, instead of just starting to play it. Sometimes i misclick a song, and I don't want it to count as a "played" song. Thanks.
Title: Play Counter
Post by: Sebert on 2004-04-14 00:08:42
Thanks. Works great with foo_tunes !
Title: Play Counter
Post by: tourmalet on 2004-04-14 00:11:49
I'm sorry, but I don't understand how to use this. I've placed it in my "components" folder, but how do I get it to work / show up in my playlists?

I suspect I'm missing something obvious, but any help would be appreciated. 
Title: Play Counter
Post by: tboehrer on 2004-04-14 00:27:11
You have to change your formatting for the playlist.  Assuming you use the default interface, go to Preferences->Display->Title Formatting and modify the formatting for the Playlist.

For example, at the bottom of the formatting string that's there add:

Code: [Select]
$if(%play_date%,'   '$substr(%play_date%,3,4)-$left(%play_date%,2)-$right(%play_date%,2),'           ')


This will display the last played date as "mm-dd-yy" after the track length.  This will only look right if you have a fixed space font...

I use foo_ui_columns, and it's similar... but different. 
Title: Play Counter
Post by: Otto42 on 2004-04-14 01:04:16
Support for this needs to be added into foo_pod as well. With a correct playcount and last time played timestamp, it'll make it one step closer to keeping correct information during a sync and producing more fields for smart playlists and such.
Title: Play Counter
Post by: tboehrer on 2004-04-14 01:06:39
Quote
Support for this needs to be added into foo_pod as well.


I'm not familiar with foo_pod... If someone wants to explain what is required, I'd be interested in making it compatible if possible.
Title: Play Counter
Post by: Raymond on 2004-04-14 01:16:28
Terrific! It's exactly what I've been waiting for for a long time. 

Quote
Maybe in the next version you can add an option to update only when you finish a song, instead of just starting to play it. Sometimes i misclick a song, and I don't want it to count as a "played" song. Thanks.

I'm with this.
Title: Play Counter
Post by: tboehrer on 2004-04-14 01:25:59
Quote
Quote
Maybe in the next version you can add an option to update only when you finish a song, instead of just starting to play it. Sometimes i misclick a song, and I don't want it to count as a "played" song. Thanks.



I'm with this.


I'm with this too.  Ummm... wait... that means I have to do it.  Nevermind.  That's a really dumb idea.   

I'll get on it.  I noticed the same thing.
Title: Play Counter
Post by: Silverbolt on 2004-04-14 01:57:56
Hmm, though it only updates the DB, it will write to the file if any tags are ever updated. Any way around this? (besides the obvious 'Block tag update operations' which would prevent any tag changing to files completely). As a tech field maybe? Thanks as well, as this plug-in's really useful.
Title: Play Counter
Post by: Giljorak on 2004-04-14 02:58:21
Here is the format I used, I added the time stamp to the code that tboehrer provided.



Code: [Select]
$if(%play_date%,' '$substr(%play_date%,3,4)
|$left(%play_date%,2)|$right(%play_date%,2)' @ '
$left(%play_time%,2):$substr(%play_time%,3,4),
'                 ')

Code: [Select]
The output looks like this at the end of my playlist:
04|13|04 @ 19:33
Title: Play Counter
Post by: tboehrer on 2004-04-14 03:01:37
Quote
Hmm, though it only updates the DB, it will write to the file if any tags are ever updated.


Good point.  Originally, I wanted to update the file immediately, but didn't like the fact that WAV files would cause the Console to appear.  Updating the DB (and deferring the update) changes the issue slightly.  But then again, tech info is written to file too, are they not?
Title: Play Counter
Post by: mazy on 2004-04-14 11:32:24
Quote
But then again, tech info is written to file too, are they not?

i think that not, though i'm not sure (replaygain is technical info and gets updated, tracking infos like filesize not - hard to say).

anyway, i think that you should move it to technical info.

there should be additional tag saying whether to keep that info only in database / prevent it from writing to the files (or add blocklist). peter, would you add that? i guess time calls for it
Title: Play Counter
Post by: tboehrer on 2004-04-14 13:34:16
Quote
anyway, i think that you should move it to technical info.


I guess I would need a more definitive reason to move it to tech info.  It's not really a programming issue because it's just as easy to put it one place vs the other. 

It's more of an issue of whether one place is any better than the other, and whether it shouldn't be written to file.  From experience with Winamp, which stored it in the DB only, the playcount info was lost when a file was moved, or when the DB was rebuilt.  It was inconvenient.

Plus, if I look at the contents of a track (with a binary editor), I at least see the replaygain tags.  This would indicate at least that written to file.  Yes?

Quote
there should be additional tag saying whether to keep that info only in database / prevent it from writing to the files (or add blocklist).


I take it you are saying something like this doesn't exist now and you are asking Peter to add it?
Title: Play Counter
Post by: foosion on 2004-04-14 14:27:00
Tech info represents file properties, and thus is not stored to the file, rather it is derived from the file. Metadata on the other hand is stored in some kind of tagging format (depending on the file format and user preferences). Replaygain data is special, as most format store it as metadata (afaik), yet fb2k stores it as tech info internally.

As for play counter and similar data such as rating: I think these are rather related to the user than the files (like artist, title or any other tag). As such, I'd hesitate to store them in the file. fb2k's inability to separate metadata that is to be stored in the files from metadata that is to be stored in the database only, kept me - and probably all the others - from implementing a play counter plugin before.
Title: Play Counter
Post by: tboehrer on 2004-04-14 14:47:57
Quote
As for play counter and similar data such as rating: I think these are rather related to the user than the files (like artist, title or any other tag). As such, I'd hesitate to store them in the file.


I've always preferred functionality over some perceived notion of "correctness".  There is certainly no harm in storing play count information as tags (that I've heard). 

As a matter of fact, I pulled the PLAY_COUNTER from a list of tags for Matroska (PLAYCOUNTER for ID3v2.4.0).  Not to mention tags like ENCODINGTIME, TAGGINGTIME, etc...  This gives some basis for using tags.

Not to mention that it would be generally desirable to have play information follow the file, because after all, it is related to a specific track.

So... I'll stick with using tags.  If, at some later date, fb2k supports true DB-only information, I can add support for that.
Title: Play Counter
Post by: foosion on 2004-04-14 15:46:50
Quote
I've always preferred functionality over some perceived notion of "correctness".  There is certainly no harm in storing play count information as tags (that I've heard).

I in no way meant to condemn your approach. It is a perfectly valid solution in a single user setting. However, there are complications when multiple users share a music collection and tag writing is enabled: for example, the play count from user A will "carry over" to user B, if it gets written to the file. As already mentionend, this is a limitation of the current API, not of your plugin.

Sorry for nitpicking, I guess I have a bit of a perfectionist in me.
Title: Play Counter
Post by: tboehrer on 2004-04-14 15:59:55
Quote
I in no way meant to condemn your approach.


No offense taken.  I realized your comments were purely analytical, and meant as counterpoint.

Quote
It is a perfectly valid solution in a single user setting. However, there are complications when multiple users share a music collection and tag writing is enabled:


Good point.

Quote
Sorry for nitpicking, I guess I have a bit of a perfectionist in me.


Me too (when I can be).  On that note, does anyone know how to eliminate the console warning when a WAV file is updated?  For that matter, are there other formats that give the same warning?  I guess I'm looking for a method called "is_this_going_to_throw_up_an_annoying_warning", or at least a way deduce this information.  For example, could the only way be to add a config field indicating which extensions (.wav,etc...) to skip?
Title: Play Counter
Post by: Radion on 2004-04-14 16:24:16
Very cool plugin! THX!
Title: Play Counter
Post by: tboehrer on 2004-04-14 18:19:58
New version 1.1 (Apr 14 2004):

Added preferences dialog with:

1) Added option to update counter when playback starts (as opposed to when playback completes).  If disabled, the counter does not update until playback completes normally; manually stopping playback (or switching to another track) will not update the counter.

2) Added "DB only mask" to compensate for lack of support for determining files that don't support tags.  i.e., WAV files.  In version 1.0, a DB update was done for all files, but this only defers updating the file (the next tag update will also write
the play counters).  The default value is "*.wav", which will cause it to not attempt
updates to WAV files.  If the method used in 1.0 is desired, a mask of *.* can be
used instead.  Hopefully I discover a better way...

Play Counter 1.1 (Binary) (http://65.17.81.165/foobar/foo_playcount.dll)

Play Counter 1.1 (Source) (http://65.17.81.165/foobar/foo_playcount.zip)
Title: Play Counter
Post by: Paranoia on 2004-04-14 19:13:36
I'll av a play with it now 

Is there no easy way to get it to update 50% of the way through? thas my only major quibble atm - its not a major one, it'd just be better at 50% I feel.

Good work :-)

Steve
Title: Play Counter
Post by: tboehrer on 2004-04-14 19:20:35
Quote
Is there no easy way to get it to update 50% of the way through?


I knew someone would ask for that... hehehe

I'll do it the next time I'm in the code.
Title: Play Counter
Post by: Paranoia on 2004-04-14 20:58:40
Thank You 
Title: Play Counter
Post by: Killmaster on 2004-04-14 23:10:44
Quote
Quote
Is there no easy way to get it to update 50% of the way through?


I knew someone would ask for that... hehehe

I'll do it the next time I'm in the code.

Actually, a slider to choose what percentage you'd like would probably be best... cool plugin BTW, been wanting something like this for a while
Title: Play Counter
Post by: tboehrer on 2004-04-15 04:59:36
OK... last change for awhile... I hope... 

1.2 (Apr 14 2004):

1) Replaced option to update at play start vs completion with a slider bar so that
a playback percentage can be specified instead.


Play Count (Binary) (http://65.17.81.165/foobar/foo_playcount.dll)

Play Count (Source) (http://65.17.81.165/foobar/foo_playcount.zip)

Enjoy...
Title: Play Counter
Post by: Otto42 on 2004-04-15 05:08:00
Quote
2) Added "DB only mask" to compensate for lack of support for determining files that don't support tags.  i.e., WAV files.  In version 1.0, a DB update was done for all files, but this only defers updating the file (the next tag update will also write
the play counters).  The default value is "*.wav", which will cause it to not attempt
updates to WAV files.  If the method used in 1.0 is desired, a mask of *.* can be
used instead.  Hopefully I discover a better way...

Play Counter 1.1 (Binary) (http://65.17.81.165/foobar/foo_playcount.dll)

Play Counter 1.1 (Source) (http://65.17.81.165/foobar/foo_playcount.zip)

Is there any easy way to have it NEVER update the actual files themselves with this information? I don't want my MP3 tag, for example, to get an update everytime I play a file. I do want other updates to the tags to occur, but I don't want playcounts/timestamps/that sort of thing to get in there. Not even deferred. I do want this info stored in the foobar DB, just not in the files.

This may be outside the scope of this plugin, but I figured I'd ask anyway.
Title: Play Counter
Post by: tboehrer on 2004-04-15 05:21:21
Quote
Is there any easy way to have it NEVER update the actual files themselves with this information?


Well... that was the gist of the discussion earlier in this thread.  I don't see a way, and foosion doesn't either, to prohibit updates to the files (for just these tags).

This is one of those "use it if you don't mind the side effect" type plugins.  As for myself, I could care less if these tags are in the file.  That is, after all, the purpose of meta data.  But each to their own I suppose... 

Maybe someday the fb2k god's will add DB only meta info...
Title: Play Counter
Post by: mazy on 2004-04-15 06:01:29
Quote
Maybe someday the fb2k god's will add DB only meta info...

yeah, we definitely need that! some easy function which would set special flag for given tag, which would keep it db only ...

this would need only small change to sdk and db.
Title: Play Counter
Post by: Raymond on 2004-04-15 07:39:46
Quote
OK... last change for awhile... I hope... 

1.2 (Apr 14 2004):

1) Replaced option to update at play start vs completion with a slider bar so that
a playback percentage can be specified instead.


Play Count (Binary) (http://65.17.81.165/foobar/foo_playcount.dll)

Play Count (Source) (http://65.17.81.165/foobar/foo_playcount.zip)

Enjoy...

Perfect for me now. 
Thanks!
Title: Play Counter
Post by: Neksus on 2004-04-15 13:54:03
Very very nice plugin!!!
I am adding a Play Counter Column to my Azrael formatting string!!

--
Neksus
Title: Play Counter
Post by: teetee on 2004-04-15 15:54:02
This looks like a very useful plugin, unfortunately I can't get it at the moment.. The server seems inaccessible. Could you (someone) upload the latest version to the Uploads Forum (http://www.hydrogenaudio.org/show.php/showforum/42) please? Thanks!
Title: Play Counter
Post by: Neksus on 2004-04-15 16:01:48
Quote
This looks like a very useful plugin, unfortunately I can't get it at the moment.. The server seems inaccessible. Could you (someone) upload the latest version to the Uploads Forum (http://www.hydrogenaudio.org/show.php/showforum/42) please? Thanks!

Here is my mirror!
foo_playcount.dll (http://www.neksus.dk/foobar/foo_playcount.dll)

--
Neksus
Title: Play Counter
Post by: tboehrer on 2004-04-15 16:04:21
Quote
This looks like a very useful plugin, unfortunately I can't get it at the moment.. The server seems inaccessible. Could you (someone) upload the latest version to the Uploads Forum please? Thanks!


Yeah... sorry... the server it's on just bit the dust for the momemt.  It will be back up in a little while.
Title: Play Counter
Post by: upNorth on 2004-04-15 19:52:48
Thanks tboehrer, I have been waiting for a plugin like this. I personally like the fact that tags are added to the files and not just kept in database.

I noticed that the percentage, only reflects the position of the progress bar, and not the actual percentage of the file that has been played. Not a big problem for me as I rearely touch the progress bar anyway, but I guess some might find it inconvenient that skimming through a file is counted.
Title: Play Counter
Post by: tboehrer on 2004-04-15 20:20:55
Quote
I noticed that the percentage, only reflects the position of the progress bar, and not the actual percentage of the file that has been played.


Huh?  If I have a 163 second long track, set the percentage to 20%, it does the update at approx 32 seconds into the file.  60% would be approx 98 seconds into the track.  Both seem to work here.  What are you seeing?

EDIT:  I think I understand... correct me if I'm wrong.  You are thinking that, assuming 20% complete (for 163 second track), that after 32 seconds of played audio, irrespective of the seek bar position the update would happen.  Not just simply once the seek bar passed the 32 second mark.  If so, interesting.  Never considered that.
Title: Play Counter
Post by: brainzelda on 2004-04-15 22:27:28
Thanks for the quick updates. Perfect for me now. 
Title: Play Counter
Post by: Raymond on 2004-04-16 04:13:32
Are tags really added to files? I move some files to another folder and play them again, all pre_added tags are lost.
Title: Play Counter
Post by: tboehrer on 2004-04-16 04:46:50
Quote
Are tags really added to files? I move some files to another folder and play them again, all pre_added tags are lost.


Works here...

Open your console, and play a track.  You should see messages that the file is getting updated.
Title: Play Counter
Post by: Raymond on 2004-04-16 04:59:56
Quote
Quote
Are tags really added to files? I move some files to another folder and play them again, all pre_added tags are lost.


Works here...

Open your console, and play a track.  You should see messages that the file is getting updated.

Yeah I can see a message in console like this:

INFO (foo_playcount) : file://E:\Music\== Listening ==\Rock  Pink Floyd - Animals\03 Pigs (Three Different Ones).mpc

And the tags are do added. But if move this file to another place and play it , its tags are lost. Then move it back, the tags are back too! Really strange.
Then I doubt if tags are stored in DB file, I delete database.foo file, the tags are still there. Confused...
Title: Play Counter
Post by: tboehrer on 2004-04-16 05:02:30
Edit:  deleted
Title: Play Counter
Post by: Raymond on 2004-04-16 05:14:52
Quote
Why don't you e-mail me at:  tboehrer at calltower dot com

we can work through this and not clutter the thread...

Ok, check your emailbox pls.
Title: Play Counter
Post by: guruboolez on 2004-04-16 08:28:17
Quote
Quote
I noticed that the percentage, only reflects the position of the progress bar, and not the actual percentage of the file that has been played.


Huh?  If I have a 163 second long track, set the percentage to 20%, it does the update at approx 32 seconds into the file.  60% would be approx 98 seconds into the track.  Both seem to work here.  What are you seeing?

EDIT:  I think I understand... correct me if I'm wrong.  You are thinking that, assuming 20% complete (for 163 second track), that after 32 seconds of played audio, irrespective of the seek bar position the update would happen.  Not just simply once the seek bar passed the 32 second mark.  If so, interesting.  Never considered that.

If I set the bar to 98%, the tags are updated if I'm seeking directly to the end of the file. Even if the file is 30 minutes long, and if I play it during 5 seconds, the tags are updated if I'm playing the last 10 seconds (tested with v.1.2).
Title: Play Counter
Post by: teetee on 2004-04-16 13:14:30
Cool, this works for me.

Edit: Discovered your other new plugin - the Extended Playlist Generator.

The only problem for me is I can't easily generate the playlists I want because of the date and time being in different fields. Also the date being in that form is difficult. It would be a lot easier if it was stored as seconds since Epoch..

e.g. I can't do "play_date LESS 150304" to get songs I haven't played since 150304. Either moving this to 040315 format or changing the fields to a single "second since epoch" would solve this.
Title: Play Counter
Post by: tboehrer on 2004-04-16 16:19:20
Quote
...changing the fields to a single "second since epoch" would solve this.


Changing to this would make it difficult to format for the display, yes?  What about an optional 3rd timestamp?
Title: Play Counter
Post by: tboehrer on 2004-04-16 16:28:06
Actually, what about being able to specify the format for the date and time fields?  That way, you could pick the format that best suits you.  Maybe even an option to disable a tag?
Title: Play Counter
Post by: teetee on 2004-04-16 16:30:20
Quote
Quote
...changing the fields to a single "second since epoch" would solve this.


Changing to this would make it difficult to format for the display, yes?  What about an optional 3rd timestamp?

mm I know.. I think the ideal situation would be for Peter to add a couple of TAGZ functions to translate between timestamps and pretty dates, and a $time_now() function.

I don't imagine these would be particularly high on his priority list. So, for now, please do implement a 3rd timestamp field .

Thankyou!
Title: Play Counter
Post by: teetee on 2004-04-16 16:33:54
Quote
Actually, what about being able to specify the format for the date and time fields?  That way, you could pick the format that best suits you.  Maybe even an option to disable a tag?

That would be even better. Allowing people to have x tags added to a file when has been played y% through. Each of the tags being a combination of the information coming out of a time() function (timestamp, yearday, monthday, hour, etc..)

Makes for possible redundancy but that is up to the user..
Title: Play Counter
Post by: Neksus on 2004-04-16 16:34:41
Quote
Actually, what about being able to specify the format for the date and time fields?  That way, you could pick the format that best suits you.  Maybe even an option to disable a tag?

This sounds like an idea!

--
Neksus
Title: Play Counter
Post by: tboehrer on 2004-04-16 16:34:41
The more I think about it, I'm not sure how someone would easily use "seconds since epoch".  It's not as if humans are used to using a timestamp like that.  For example, if you wanted to know what was played since last Friday, what is the value?  Not very practical I would think?
Title: Play Counter
Post by: tboehrer on 2004-04-16 16:40:06
Quote
That would be even better. Allowing people to have x tags added to a file when has been played y% through. Each of the tags being a combination of the information coming out of a time() function (timestamp, yearday, monthday, hour, etc..)


I'm not sure what you are saying.  I was thinking something along the line of being able to enter: YYMMDD.  Or if they wanted to preformat it MM-DD-YYYY, or DD/MM/YY.  You probably wouldn't want to use non-numbers in the format if you wanted to do what you had suggested (play_date LESS 040415).  But it would save having to have the various title formatting do it.  Up to the user though.
Title: Play Counter
Post by: teetee on 2004-04-16 16:49:25
Quote
Quote
That would be even better. Allowing people to have x tags added to a file when has been played y% through. Each of the tags being a combination of the information coming out of a time() function (timestamp, yearday, monthday, hour, etc..)


I'm not sure what you are saying.  I was thinking something along the line of being able to enter: YYMMDD.  Or if they wanted to preformat it MM-DD-YYYY, or DD/MM/YY.  You probably wouldn't want to use non-numbers in the format if you wanted to do what you had suggested (play_date LESS 040415).  But it would save having to have the various title formatting do it.  Up to the user though.

I think I went over the top with that

The main thing is for it to be possible to do three things (as far as I can think):
1. Display a nice date/time for the last time this song was played without having to resort to too much (or any) title-formatting. This is already possible given the way you have made the plugin.

2. Use a search of some sort to find songs last played on or after a certain day. This would be possible using YYMMDD instead of the current DDMMYY

3. Use a search to find songs last played more than a certain length of time ago (e.g. 24hrs). Just saying "the day before" doesn't work if it is just after midnight . I believe this would be best done with a timestamp in seconds as you can then get the current time and subtract the length you want. Neither of the above would allow this because ***this was incorrect! woops***
Title: Play Counter
Post by: teetee on 2004-04-16 17:00:01
Ok what I meant in part 3 was assuming the split play_date and play_time fields, you couldn't say play_date LESS 040416 AND play_time LESS 2000  to get all tracks played before 8pm on 16-04-04. Of course this is irrelevant if you can choose the formatting to be: YYMMDDHHMM

If that was the case, the reason I was talking about

Quote
Allowing people to have x tags added to a file when has been played y% through.


was to allow one field to be play_date_readable (for e.g.) and one to be play_date_calculable.

obviously with better names
Title: Play Counter
Post by: tboehrer on 2004-04-16 17:00:16
Quote
***this was incorrect! woops***


You caught it before I could point that out. 

The nice thing about formatting is that you could set the format for PLAY_DATE to YYMMDDHHMMSS, and easily use  "play_date GREATER 0404142000".  With a timestamp, you'd first have to figure out what the seconds past the epoch are (not very straight forward.
Title: Play Counter
Post by: Pamel on 2004-04-16 17:17:13
Please, make the storage of the time format standard, and then just choose the way it would be displayed.  Not using a standard format means that you will have cases that make it impossible to determine the real date.

Example:
User stores the date as 10/08/2000.  In Europe this means August 10th, 2000.  In the US, it means October 8th, 2000.

Solution:
Always store the time in a well defined format.  I would suggest the W3 Date/Time format (http://www.w3.org/TR/NOTE-datetime).  It is simple, well defined, a subset of the ISO 8601 standard, and the accuracy can be changed by where you truncate the date.  It is also easy to parse for simpler display.  (You may want to leave out the "T" in the middle for readability though.)
Title: Play Counter
Post by: tboehrer on 2004-04-16 17:50:31
Quote
Please, make the storage of the time format standard, and then just choose the way it would be displayed. Not using a standard format means that you will have cases that make it impossible to determine the real date.


This is a tricky issue.  Say a common format is chosen.  Do we store timezone information?  We don't now, it's just the local time.  If we store timezone info, this complicates displaying a local time in the playlist (or wherever).  Or, we could store everything GMT, but displaying local time is still a problem.

My point is this:  There is no simple way to handle this when this info is expected to be used by TAGZ.  If someone were using this via C++, it's a different question, and I would store a timestamp.

Would it not be acceptable to allow the user to specify the format?  That is, you could choose to enter a format that produces ISO 8601.
Title: Play Counter
Post by: tboehrer on 2004-04-16 20:56:23
New version:

1.3 (Apr 16 2004):

1) Added support for specifying the date/time tags and format.  The tag name can be specified, or left blank to skip.  For either field, a format string can be specified.



The preference page lets you specify up to two tags, and each corresponding format.  If you don't change the preference page, it should work exactly as the previous version.

If you want something like teetee desired, you could change the first tag name to "PLAY_STAMP", and use a format that produces YYMMDDhhmmss, then blank out the fields for the second tag.

It's also possible to use the masstagger to combine (and reformat) the existing fields into a single field.  For example, use "Format value from other fields", specify PLAY_STAMP as the destination field name, and for the Formatting Pattern, use:

Code: [Select]
"$right(%play_date%,2)$substr(%play_date%,3,4)$left(%play_date%,2)%play_time%"


This would combine PLAY_DATE and PLAY_TIME into a PLAY_STAMP of the format mentioned above.

It will make more sense when you look at the pref page and formatting help dialog.

Play Count 1.3 (Binary) (http://65.17.81.165/foobar/foo_playcount.dll)

Play Count 1.3 (Source) (http://65.17.81.165/foobar/foo_playcount.zip)
Title: Play Counter
Post by: Silverbolt on 2004-04-17 03:01:59
Very nice, thanks tboehrer :]

For those who want to use the W3 Date/Time format (http://www.w3.org/TR/NOTE-datetime) as Pamel suggested, I've saved you the (little) trouble so you can just paste this into the format:
Code: [Select]
%Y-%M-%DT$H:$M:$S$T


Edit:
you can also convert the older PLAY_DATE and PLAY_TIME tags to this format, as tboehrer pointed, using the Masstagger's "Format value from other fields"; use the following:
Code: [Select]
20$right(%play_date%,2)-$substr(%play_date%,3,4)-$left(%play_date%,2)T$left(%play_time%,2):$substr(%play_time%,3,4):$right(%play_time%,2)+08:00

Remember to replace the "+08:00" with whatever timezone $T gives you

Edit 2 (yeah I know; bored and nothing better to do..):

Formatting string writers, you can parse this into a nicer display
(namely, 2004-04-15T21:02:05+08:00 -> 2004.04.15 9:02:05 PM) with the following:
Code: [Select]
$if(%play_stamp%,
$left(%play_stamp%,4).
$substr(%play_stamp%,6,7).
$substr(%play_stamp%,9,10)$tab()

$if($greater($substr(%play_stamp%,12,13),12),
$sub($substr(%play_stamp%,12,13),12),
$if($strcmp($substr(%play_stamp%,12,13),00),12,
$num($substr(%play_stamp%,12,13),1)))
$substr(%play_stamp%,14,19)
$if($greater($substr(%play_stamp%,12,13),11), PM, AM))

What's nice about this one is that you can easily change the separaters if you don't like '-' (I find '.' the most visually appealing)

Edit 3: small fix in above title formatting (12 PM/AM)
Title: Play Counter
Post by: Paranoia on 2004-04-17 09:56:04
I'm struggling to see the benefit of this new feature... would putting them in this said (^) format allow sorting? (Because at the moment PLAY_DATE is just treated as a numerical value when sorting.) Or is the benefit a better appearing/easier to read timestamp?

Steve
Title: Play Counter
Post by: Paranoia on 2004-04-17 10:11:34
Okay,I'm trying to write a script that'll automatically rate my files according to number of plays. I'm new to Foobar, and I'd put myself in the 'Beginner' catagory of programming skill, but I really can't see anything wrong with this. Maybe one you funky people could help?

Quote
$if(%PLAY_COUNTER%>15,5,$if(%PLAY_COUNTER%>10,4,$if(%PLAY_COUNTER%>5,3,$if(%PLAY_COUNTER%>3,2,$if(%PLAY_COUNTER%>1,1,0)))))


The field to be endited, quite obviously is RATING. If anyone needs it explained in English I can do that, but I think its pretty obvious what I'm trying to achieve.

Steve

[EDIT] Atm, this returns 5 for every track [/EDIT]
Title: Play Counter
Post by: picmixer on 2004-04-17 10:23:54
You might want to give $ifgreater() a try.

I don't think you can use < directly as mathematical functions in TAGZ.

Hope this helps.  In case you have anymore questions, feel free to ask.

You can find a definition of $ifgreater in the titleformatting help.

edit: The usual late discovery of a typo
Title: Play Counter
Post by: teetee on 2004-04-17 10:35:14
Quote
I'm struggling to see the benefit of this new feature... would putting them in this said (^) format allow sorting? (Because at the moment PLAY_DATE is just treated as a numerical value when sorting.) Or is the benefit a better appearing/easier to read timestamp?

Steve

The benefit of changing the PLAY_DATE field to at least YYMMDD is that you will then be able to sort by date across months (and years). With the default format, if you play something on 30th April (300404) and then something on 1st May (010504), they will be sorted wrong (10,504 < 300,404).

Using the full timestamp in W3 Date/Time format allows you to also sort by time (up to second accuracy). Also, if someone wrote a plugin using these timestamps for part of its functionality, it would be better if there was one format being used with all the possible information it.

I don't think sorting across timezones would work but that would be a lot rarer for an individual .

PS Thanks for the new version tboehrer
Title: Play Counter
Post by: Linkin on 2004-04-17 11:13:02
I would like an option like "only update in db", else i have to fill in all my file types in DB Only Mask
Title: Play Counter
Post by: Paranoia on 2004-04-17 12:13:58
Quote
You might want to give $ifgreater() a try.

I don't think you can use < directly as mathematical functions in TAGZ.

Hope this helps.  In case you have anymore questions, feel free to ask.

You cam find a definition of $ifgreater in the titleformatting help.

Cheers - that works fine :-)

and Cheers teetee for that explanation. I'll give formatting a sorting a go later today... its a feature that I'd like to make use of.

Steve
Title: Play Counter
Post by: Paranoia on 2004-04-17 12:36:39
Quote
Very nice, thanks tboehrer :]

For those who want to use the W3 Date/Time format (http://www.w3.org/TR/NOTE-datetime) as Pamel suggested, I've saved you the (little) trouble so you can just paste this into the format:
Code: [Select]
%Y-%M-%DT$H:$M:$S$T


Edit:
you can also convert the older PLAY_DATE and PLAY_TIME tags to this format, as tboehrer pointed, using the Masstagger's "Format value from other fields"; use the following:
Code: [Select]
20$right(%play_date%,2)-$substr(%play_date%,3,4)-$left(%play_date%,2)T$left(%play_time%,2):$substr(%play_time%,3,4):$right(%play_time%,2)+08:00

Remember to replace the "+08:00" with whatever timezone $T gives you

Edit 2 (yeah I know; bored and nothing better to do..):

Formatting string writers, you can parse this into a nicer display
(namely, 2004-04-15T21:02:05+08:00 -> 2004.04.15 9:02:05 PM) with the following:
Code: [Select]
$if(%play_stamp%,
$left(%play_stamp%,4).
$substr(%play_stamp%,6,7).
$substr(%play_stamp%,9,10)$tab()

$if($greater($substr(%play_stamp%,12,13),12),
$sub($substr(%play_stamp%,12,13),12),
$if($strcmp($substr(%play_stamp%,12,13),00),12,
$num($substr(%play_stamp%,12,13),1)))
$substr(%play_stamp%,14,19)
$if($greater($substr(%play_stamp%,12,13),11), PM, AM))

What's nice about this one is that you can easily change the separaters if you don't like '-' (I find '.' the most visually appealing)

Edit 3: small fix in above title formatting (12 PM/AM)

Cheers, this was a fantastic help. I used the standard formatting for play_stamp, and I used your code to convert the old tags.

I edited your script slightly  I changed the date around so it was in a nicer, British format: just because the tag is in that silly order doesn't mean I have to view it like that

Thanks alot,
Steve
Title: Play Counter
Post by: tboehrer on 2004-04-17 13:51:09
Nice pointers guys!! I appreciate the AM/PM formatting... I was too lazy to figure it out myself.   

Linkin Posted on Apr 17 2004, 02:13 AM:
Quote
I would like an option like "only update in db", else i have to fill in all my file types in DB Only Mask


*.* should work.  I think...
Title: Play Counter
Post by: addicted on 2004-04-17 18:16:48
Please excuse my lack of title formatting skills, but I don't know where to place the string to show the counter (just the counter, not the last time played) at the far right of the playlist.

Here is my current formatting string:
Code: [Select]
 removed for thread space


If someone could tell me where in the string to put it, that would be great.

Thanks for the plugin, I'm looking forward to using it.
Title: Play Counter
Post by: Paranoia on 2004-04-17 20:20:27
Quote
Quote
Very nice, thanks tboehrer :]

For those who want to use the W3 Date/Time format (http://www.w3.org/TR/NOTE-datetime) as Pamel suggested, I've saved you the (little) trouble so you can just paste this into the format:
Code: [Select]
%Y-%M-%DT$H:$M:$S$T


Edit:
you can also convert the older PLAY_DATE and PLAY_TIME tags to this format, as tboehrer pointed, using the Masstagger's "Format value from other fields"; use the following:
Code: [Select]
20$right(%play_date%,2)-$substr(%play_date%,3,4)-$left(%play_date%,2)T$left(%play_time%,2):$substr(%play_time%,3,4):$right(%play_time%,2)+08:00

Remember to replace the "+08:00" with whatever timezone $T gives you

Edit 2 (yeah I know; bored and nothing better to do..):

Formatting string writers, you can parse this into a nicer display
(namely, 2004-04-15T21:02:05+08:00 -> 2004.04.15 9:02:05 PM) with the following:
Code: [Select]
$if(%play_stamp%,
$left(%play_stamp%,4).
$substr(%play_stamp%,6,7).
$substr(%play_stamp%,9,10)$tab()

$if($greater($substr(%play_stamp%,12,13),12),
$sub($substr(%play_stamp%,12,13),12),
$if($strcmp($substr(%play_stamp%,12,13),00),12,
$num($substr(%play_stamp%,12,13),1)))
$substr(%play_stamp%,14,19)
$if($greater($substr(%play_stamp%,12,13),11), PM, AM))

What's nice about this one is that you can easily change the separaters if you don't like '-' (I find '.' the most visually appealing)

Edit 3: small fix in above title formatting (12 PM/AM)

Cheers, this was a fantastic help. I used the standard formatting for play_stamp, and I used your code to convert the old tags.

I edited your script slightly  I changed the date around so it was in a nicer, British format: just because the tag is in that silly order doesn't mean I have to view it like that

Thanks alot,
Steve

Silverbolt I'm undermiming you again

I've edited your formatting script again  Here's mine now:
Quote
$ifgreater(%PLAY_COUNTER%,0,$if(%play_stamp%,
$substr(%play_stamp%,6,7).
$substr(%play_stamp%,9,10).
$left(%play_stamp%,4)$tab()

$if($greater($substr(%play_stamp%,12,13),12),
$sub($substr(%play_stamp%,12,13),12),
$if($strcmp($substr(%play_stamp%,12,13),00),12,
$num($substr(%play_stamp%,12,13),1)))
$substr(%play_stamp%,14,19)
$if($greater($substr(%play_stamp%,12,13),11), PM, AM)),)


Did this because when the track hasn't been played loadsa horrible random stuff was being displayed in Last Played collumn. There is probably a better way of scripting it, but this was the only way I could think of.

Steve
Title: Play Counter
Post by: Paranoia on 2004-04-17 20:21:34
@Addicted:

That seems to be the global script... go to Collumns, add collumn, call it what you like, and in the display tab, paste the script.

Steve
Title: Play Counter
Post by: addicted on 2004-04-17 20:55:07
Sorry, I dont use columns..... just the default playlist with the above formatting string...

(edit spelling)
Title: Play Counter
Post by: Neksus on 2004-04-17 21:06:27
@addicted

You can add this at the end of you code or where ever you want it!!
Code: [Select]
$if(%play_counter%,
$repeat('0',$sub($len2(1000),$len2(%play_counter%)))%play_counter%,0000)
Title: Play Counter
Post by: addicted on 2004-04-17 23:30:10
Thanks a lot..... I even figured out how to set it's color and add a "pipe" on the left side.
Title: Play Counter
Post by: anza on 2004-04-20 13:06:08
I'd love this plugin if it was able to put the stats on a separate (plain text?) file and that could be then accessed through some sort of interface.
The only problem I can figure would be knowing what songs are really played. Perhaps it should track them by paths, but then, if I rename a file it would b0rk the statistics. Perhaps it would be somehow possible to see changes made by foobar's masstagger/renamer, as that's the only way I rename my files.
Title: Play Counter
Post by: foosion on 2004-04-20 16:43:33
Quote
Perhaps it would be somehow possible to see changes made by foobar's masstagger/renamer, as that's the only way I rename my files.

It is possible to get notifications of files being moved by masstagger and similar plugins (if there were any), so that's not a problem. If the play counts are stored in an external file, path and subsong index should be used as key.
Title: Play Counter
Post by: tboehrer on 2004-04-20 17:07:48
Quote
Quote

(anza @ Apr 20 2004, 01:06 PM)
Perhaps it would be somehow possible to see changes made by foobar's masstagger/renamer, as that's the only way I rename my files. 


It is possible to get notifications of files being moved by masstagger and similar plugins (if there were any), so that's not a problem. If the play counts are stored in an external file, path and subsong index should be used as key.



I wouldn't hold your breath for me changing it to write to an external file... but hey... I posted the source. 
Title: Play Counter
Post by: foosion on 2004-04-20 17:25:57
Quote
I wouldn't hold your breath for me changing it to write to an external file... but hey... I posted the source.  

Thanks, I already have enough plugins of my own to keep me busy.
Title: Play Counter
Post by: anza on 2004-04-20 18:20:23
Quote
Quote

Quote

(anza @ Apr 20 2004, 01:06 PM)
Perhaps it would be somehow possible to see changes made by foobar's masstagger/renamer, as that's the only way I rename my files. 


It is possible to get notifications of files being moved by masstagger and similar plugins (if there were any), so that's not a problem. If the play counts are stored in an external file, path and subsong index should be used as key.



I wouldn't hold your breath for me changing it to write to an external file... but hey... I posted the source.   

I'm not asking you to change the current behaviour, just adding some new functionality  and for me the source is no use as I can't program at all.
Title: Play Counter
Post by: mazy on 2004-04-22 13:23:04
how could it make that info available to all other parts without altering database? foosion?
Title: Play Counter
Post by: Marinmo on 2004-04-22 14:00:59
The links (from the first post) are not working anymore.  Any specific reason, hosted on your own computer? (tboehrer)
Title: Play Counter
Post by: tboehrer on 2004-04-22 14:14:28
Quote
The links (from the first post) are not working anymore.  Any specific reason, hosted on your own computer? (tboehrer)


Seems to work for me...  I'm not really hosting it personally so to speak.  It's running on my businesses external web site.  It's a server dedicated as a web server.  Anyone else having problems?

Neksus may still have it mirrored at:
http://www.neksus.dk/foobar/foo_playcount.dll (http://www.neksus.dk/foobar/foo_playcount.dll)

Edit:While I can't rule out a server problem, there were network problems with our provider this morning... up and down... up and down.  Of course, this can happen to any server...
Title: Play Counter
Post by: Neksus on 2004-04-22 16:44:31
Quote
Neksus may still have it mirrored at:
http://www.neksus.dk/foobar/foo_playcount.dll (http://www.neksus.dk/foobar/foo_playcount.dll)

Yes my mirror is still up!

--
Neksus
Title: Play Counter
Post by: foosion on 2004-04-22 19:06:56
Quote
how could it make that info available to all other parts without altering database? foosion?

Sorry, exactly what info are you referring to?
Title: Play Counter
Post by: Killmaster on 2004-04-24 22:03:13
Besides the fact that this plugin doesn't take into account whether you've actually played through the file, there's another problem... if you play through most of a song, close Foobar while it's playing, then open it again it'll count it as being played twice.
Title: Play Counter
Post by: tboehrer on 2004-04-24 22:15:24
Quote
if you play through most of a song, close Foobar while it's playing, then open it again it'll count it as being played twice.


I'm afraid you'll have to be more specific... I can't reproduce this behavior.  What do you have your playback completion slider set at?

Edit:  I see... If you have "Resume playback after restart" enabled, it does this.
Title: Play Counter
Post by: Bax on 2004-04-24 23:10:35
My files doesn't get updated when the database is disabled, is this normal behavior? (using 1.3)
Title: Play Counter
Post by: tboehrer on 2004-04-24 23:23:15
Quote
My files doesn't get updated when the database is disabled, is this normal behavior? (using 1.3)


Yes.  But when I go in to fix killmasters issue, I'll make that an option.
Title: Play Counter
Post by: tboehrer on 2004-04-26 05:04:34
New Version 1.4 (Apr 25 2004):

1) Switched to using actual played amount to calculate update point.  i.e., Previously, the percentage complete was based on position in the track; once the seekbar passed the set percentage amount, the update took place.  Now, the update only happens when the correct percentage has actually been played.

2) Fixed issue when "Restart playback after restart" is on, and Foobar is shutdown while a track is playing, after restart, the counter could have been updated twice.  This was actually fixed by change #1 (above).

3) Added option in preferences to disable skipping of tracks not in the DB.

Known issues:

1) The "percentage complete" is reset when playback is manually stopped.  ex., If you play 50% of the file, and press stop, then restart playback, the percentage complete starts again at 0.

2) If you have "Restart Playback after restart" active, and shutdown Foobar while playback is active, the percentage complete is NOT preserved.  i.e., At restart, the percentage complete starts again at 0.

I am undecided when/if I will address these.  If enough people want it, I suppose it can be added at some point.


Play Count (Binary) (http://65.17.81.165/foobar/foo_playcount.dll)

Play Count (Source) (http://65.17.81.165/foobar/foo_playcount.zip)
Title: Play Counter
Post by: Paranoia on 2004-04-26 16:26:28
Seems to be working well

Cheers,
Steve
Title: Play Counter
Post by: Giljorak on 2004-04-26 22:49:59
Just installed the latest version works great.
However this was not fixed:
Quote
2) Fixed issue when "Restart playback after restart" is on, and Foobar is shutdown while a track is playing, after restart, the counter could have been updated twice. This was actually fixed by change #1 (above).

The double update still happens it just happens a little later. Here is an example:
I have update counter set to 10%.
I play a song until it has played 50% (counter was updated at 10%) and close foobar when I restart foobar the song starts and when the playback reaches 60% the counter is updated again.


I guess this is covered by this:
Quote
2) If you have "Restart Playback after restart" active, and shutdown Foobar while playback is active, the percentage complete is NOT preserved. i.e., At restart, the percentage complete starts again at 0.



Thanks for the great plugin.
Title: Play Counter
Post by: Killmaster on 2004-04-26 23:25:13
Perhaps that could be fixed by having the plugin make a note of what song is currently playing when Foobar closes? I'm no programmer, but it probably wouldn't be that hard to set a "file's been played enough" flag at close.
Title: Play Counter
Post by: tboehrer on 2004-04-26 23:35:36
Quote
Perhaps that could be fixed by having the plugin make a note of what song is currently playing when Foobar closes? I'm no programmer, but it probably wouldn't be that hard to set a "file's been played enough" flag at close.


One would think.  That's what I thought.  But it's not as straight forward as I would prefer.  But then again... that's the challenge.

The problem is, given the way it's written, a "stop" clears the info.  But on system shutdown, I get the stop prior to the shutdown.  i.e., The info is gone already.

It's not a big problem... just have to rethink it a bit.

While I'm not effected by this bug, I can't just let you guys live with it...  I see what I can come up with.  Shouldn't take too long. 
Title: Play Counter
Post by: mazy on 2004-04-27 13:49:04
Quote
Quote
how could it make that info available to all other parts without altering database? foosion?

Sorry, exactly what info are you referring to?

things like this play counter etc. my understanding is that plugings etc. can provide additional 'variables' to formatting functions using that 'extra items' list, or what is its name.

however, it's not possible to do that on general level, is it? like appending common list of these name-value pairs to every call to formatting functions (it would be nice to have callback which would get called prior to any formatting function with metadb handle and would return secondary 'extra items' list).

so, right now, one has to store anything he wants to be available to all parts of foobar in database / tags, am i correct?

possible ways in new versions of foobar:

1) provide above-mentioned callback (there could be problems like duplicate names - from database, callbacks and the caller)

2) give us a way to make some info in database permanently db-only (flag or something)
Title: Play Counter
Post by: foosion on 2004-04-27 17:47:10
Quote
so, right now, one has to store anything he wants to be available to all parts of foobar in database / tags, am i correct?

Yes, that's correct.
Title: Play Counter
Post by: tboehrer on 2004-04-28 18:56:16
New Version 1.4.1 (Apr 28 2004):

1) Really did fix issue #2 from 1.4

If you don't require this fix, there really isn't a big reason to update.

Play Counter 1.4.1 (http://65.17.81.165/foobar/foo_playcount.dll)


I'm going to be out-of-pocket for a couple days... if the new version has a problem, you can get the 1.4 version at

Play Counter (Previous Version) (http://65.17.81.165/foobar/prior/foo_playcount.dll)
Title: Play Counter
Post by: kode54 on 2004-04-29 10:24:14
I tinkered with your source code a bit this morning, producing the following changes:

1) All tags are written to the info block instead of metadata.
2) Fixed timestamp field is stored as milliseconds elapsed since 1/1/0001, UTC.
3) Configured fields can be whatever you want, formatted by the same rules as strftime, in local time. Since they are always formatted from the UTC timestamp, they will be regenerated whenever you reload info from a file that is already stored in the external play count database.
4) Since info can be munged by reloading, play count and UTC timestamp are stored in an external database, referenced by file path and subsong index. For now, this database is an external MySQL database, interfaced by pmysql class. I may work on a custom internal database system later.

There is no configuration for the database, and I have not even modified the configuration to remove the now obsolete database-only options or add configuration for the external database.

The change to strftime formatting was due to the fact that I decided to use the PTypes datetime type and related functions for the play start time, since I was already using the PTypes-based MySQL wrapper.

The database reloading action queues a message window to retrieve the values from the external database after the callback, since modifying the database from within callbacks is a big no-no. It's still a dirty hack, since the info is refreshed from the external source after the actual reload, so the info will not be visible immediately. Example, you will not see the delay reloaded info if you click reload from the file info dialog. This is basically a dirty workaround for trying to do something that is otherwise impossible with the current API.

This is not in any workable condition for release, at least not yet. I will integrate your 1.4.1 changes, if you included them in the source archive ... later.
Title: Play Counter
Post by: tboehrer on 2004-04-29 21:32:05
What is the advantage of any of these changes, is it your expectation these changes be incorporated into my version, and if the info is stored in an external DB, can it still be accessed from other tools like DB Search or the Playlist Generator?
Title: Play Counter
Post by: Oedipax on 2004-04-29 23:27:39
I know this is a terribly dumb question in all likelihood, but is there a way to get the play count to display in the regular track list? I have %PLAY_COUNTER% listed as part of my display string but it shows up as just %PLAY_COUNTER%.

Can someone help? Oh, and my string is as follows:

Code: [Select]
$if(%_isplaying%,0009B0,)$directory(%_path%,2) | $directory(%_path%,1) | %_filename%  '('%_length%')' '['Played %PLAY_COUNTER% times']'


As always, thanks in advance for the help.
Title: Play Counter
Post by: kode54 on 2004-04-29 23:33:41
It can only be accessed by other tools as long as it lives somewhere within the metadb. It will, even after info reload, but the reload hack is a tad dodgy.

Requiring an external MySQL database is a bit much, as well. I only made it for my own use, but I may share it widely if anyone really wants it, along with a PHP page for producing a nice Last (15) songs played page.

I did not incorporate most of the latest changes, mainly because of the initquit hack. Hmm, maybe the variables that config variable needs to store from could be made static global, since the callback class is a static single instance anyway. That instantiate/cast method is a bit dodgy, never mind the restart guesswork. Oh, and what happens if a user closes the player before a second has elapsed? Hehehe.

I'll post some source code a bit later. It currently requires both PTypes and the pmysql class, as well as MySQL source code for the mysqlclient library. (Since there is no binary that links against the dynamic runtime.)

Maybe I should just up the external requirements to HTTP server and PHP so I can reduce all the component-side overhead. The current binary is exactly 200KB.
Title: Play Counter
Post by: tboehrer on 2004-04-30 04:12:57
WARNING.... geek talk about to happen.... 

Quote
Oh, and what happens if a user closes the player before a second has elapsed? Hehehe


Since the initial time callback never arrived, it will be as if the file was never started.  Upon restart, everything will work out.  The end result?  It will work properly to within 1 second.  I believe that to be acceptable.  Yes?

Quote
I did not incorporate most of the latest changes, mainly because of the initquit hack. Hmm, maybe the variables that config variable needs to store from could be made static global, since the callback class is a static single instance anyway.


The cfg vars actually should have been static.  But the fact they aren't doesn't really change anything.  They are already global.  i.e., playcounter sets global variables already, yes?  Or are you referring to something else?

Actually, I never considered the initquit technique a hack.  The initquit technique, is much cleaner than other alternatives.  The key there was getting the "on_quit" shutdown callback.  What other technique can you think of?  The initquit could call a global callback function, which in turn calls a global "playcounter" variable.  Not very clean or OO.  What I really would have liked to do was implement the initquit interface on the playcounter class so that it could receive the callback directly...

Quote
That instantiate/cast method is a bit dodgy, never mind the restart guesswork.


The restart logic is semi-dodgy because fb2k doesn't provide enough info (that I can see).  Can you think of a better way?  If the "on_playback_stop" would provide a reason that indicated a stop is being called because fb2k is shutting down, AND there was an event telling us a restart was happening, it would be much much cleaner.  But in the end, while confusing, appears to be safe.


Quote
Maybe I should just up the external requirements to HTTP server and PHP so I can reduce all the component-side overhead. The current binary is exactly 200KB.


So instead of writing to a DB you write to an HTTP service... thereby eliminating MySQL?  Makes sense since that would have been my first worry.  But my ultimate concern is that being in an external store precludes searches using play count info, which is really what the use of play count info is was for.  Though... I've seen requests to have it external, so your changes will be useful to some.  I believe I read in the foo iPod thread that they wanted it external?
Title: Play Counter
Post by: tboehrer on 2004-04-30 04:25:08
Oedipax Posted on Apr 29 2004, 04:27 PM
Quote
  I know this is a terribly dumb question in all likelihood, but is there a way to get the play count to display in the regular track list? 


Yes.  It works lik any other tag.  I can't test it where I am at... no fb2k (*gasp*) on the computer I am using...

It looks like your single quotes are wacky...

Code: [Select]
$if(%_isplaying%,0009B0,)$directory(%_path%,2) | $directory(%_path%,1) | %_filename%  '('%_length%') ['Played' %PLAY_COUNTER% 'times]'


If this doesn't help, and someone else doesn't help first, I will be in a position to help tomorrow night (or if it's not night where you are at... 22 hours from now).
Title: Play Counter
Post by: kode54 on 2004-04-30 04:51:35
Quote
WARNING.... geek talk about to happen.... 

Quote
Oh, and what happens if a user closes the player before a second has elapsed? Hehehe


Since the initial time callback never arrived, it will be as if the file was never started.  Upon restart, everything will work out.  The end result?  It will work properly to within 1 second.  I believe that to be acceptable.  Yes?

WARNING: User is running on fumes. Gee, I don't know why I didn't think of that. Umm, no crap? :B

Quote
Quote
I did not incorporate most of the latest changes, mainly because of the initquit hack. Hmm, maybe the variables that config variable needs to store from could be made static global, since the callback class is a static single instance anyway.


The cfg vars actually should have been static.  But the fact they aren't doesn't really change anything.  They are already global.  i.e., playcounter sets global variables already, yes?  Or are you referring to something else?

I mean the current local variables in the callback class. Since the callback is a static class, you can safely move the _played and _length variables out, rename to g_played/g_length, implement the cfg variable storage directly from on_quit.

Quote
Quote
Maybe I should just up the external requirements to HTTP server and PHP so I can reduce all the component-side overhead. The current binary is exactly 200KB.


So instead of writing to a DB you write to an HTTP service... thereby eliminating MySQL?

No, I meant using HTTP with a PHP script as a bridge to MySQL. That way, the component is only about 20-30KB, using PTypes or even simply wininet to perform the http request. Then you only have to worry about URL encoding the query strings.

Quote
  But my ultimate concern is that being in an external store precludes searches using play count info

Which is why it is still stored in the database. Searches can reference info fields, I think...

The external database is only backup for when the user reloads the info from the file. The only problem is the uggly delayed insertion *cough*bloodyhack*cough* used to feed the info back into the database.

There might be some info insertion filters or services for such crap as this in the future, and then again, there might not.

Quote
Though... I've seen requests to have it external, so your changes will be useful to some.  I believe I read in

Right now, the info is duplicated in readily accessible info fields, and currently, only the ReplayGain info fields are ever written to the file's tags. So, this info will never modify the files.

In the future, I can add more options for actually manipulating the data...

- Forcing reload of play count / timestamp for all files referenced in the external database (if you change the formatted tag options, they will be regenerated)
- Forcing scan of external database for entries no longer referenced in the player metadb
- Hilighting entries in the current playlist based on a query to the external database ... could be simplified to facilitate a simpler internal count database, or allow full MySQL query.
- Build a playlist based on the above

Hmm, gee, I could some day start working on a MySQL-based replacement for the core DB, if the API allowed for database replacement. I'm not too sure how I'd go about storing multiple values under the same name... (Why yes, fundamental differences in the Foobar2000 and MySQL database systems would make it hard to use MySQL as a replacement for the core DB, and they don't stop at just this.)

Hmm, now that I think about it, it wouldn't be too hard to store metadata in one table and info in another. Multi text strings in one column would be a bit of a challenge. Not to mention it would be nearly impossible to preserve original field order without a special field to indicate the original order. It would also prove fun creating new fields in the table whenever a new field name pops up....
Title: Play Counter
Post by: koach on 2004-04-30 05:01:19
I think I found a minor bug.

Preset name including ']' character isn't saved properly after restart.

Anyway, thanks for the nice component which is really useful.

EDIT:Oops, this is the commet for the extended playlist generator plugin. Sorry, just ignore this.
Title: Play Counter
Post by: tboehrer on 2004-04-30 05:07:08
Quote
I mean the current local variables in the callback class. Since the callback is a static class, you can safely move the _played and _length variables out, rename to g_played/g_length, implement the cfg variable storage directly from on_quit.


I gotcha... Mainly I don't do that because global data breaks encapsulation rules of OO... one of the purposes of a class.  My preference would be to have no cfg vars be global since they are "owned" by playcounter.  Though, breaking encapsulation for a relatively simple piece of code like this was acceptable it seems.

Quote
Forcing reload of play count / timestamp for all files referenced in the external database (if you change the formatted tag options, they will be regenerated)


Is there a metadb callback in order for you to know when meta data changes for a track?  If so, I would think it would be easy to reload the info fields from the external store automatically.

Quote
Forcing scan of external database for entries no longer referenced in the player metadb
- Hilighting entries in the current playlist based on a query to the external database ... could be simplified to facilitate a simpler internal count database, or allow full MySQL query.


Why all this work?  Is there some reason you don't want to store this info in the DB?  If I had a wish, it would be to have true "DB only" info, maybe with the option for it to be "sticky".... i.e., reloading from file doesn't blow away the sticky info.  But I don't have control over that.
Title: Play Counter
Post by: kode54 on 2004-04-30 05:43:59
Quote
Quote
I mean the current local variables in the callback class. Since the callback is a static class, you can safely move the _played and _length variables out, rename to g_played/g_length, implement the cfg variable storage directly from on_quit.


I gotcha... Mainly I don't do that because global data breaks encapsulation rules of OO... one of the purposes of a class.  My preference would be to have no cfg vars be global since they are "owned" by playcounter.  Though, breaking encapsulation for a relatively simple piece of code like this was acceptable it seems.

Now if only more people thought this way when writing audio player code, and perhaps emulators that could be modified to play only audio. There's a new N64 format, but it's a huge mess of single instance crap that I'll have to get bored and wrap into classes some day.

Quote
Quote
Forcing reload of play count / timestamp for all files referenced in the external database (if you change the formatted tag options, they will be regenerated)


Is there a metadb callback in order for you to know when meta data changes for a track?  If so, I would think it would be easy to reload the info fields from the external store automatically.

Well, you see, I do get a callback notice after the info is reloaded into the database, but I can't modify the metadata within the callback. I have to queue a db-only update for that information to occur after the callback, using a message window. This delay tactic prevents the new info from appearing in places such as the file info dialog. Once again, it's another hack for doing something the API was not designed for. (Yet.)

Quote
Quote
Forcing scan of external database for entries no longer referenced in the player metadb
- Hilighting entries in the current playlist based on a query to the external database ... could be simplified to facilitate a simpler internal count database, or allow full MySQL query.


Why all this work?  Is there some reason you don't want to store this info in the DB?  If I had a wish, it would be to have true "DB only" info, maybe with the option for it to be "sticky".... i.e., reloading from file doesn't blow away the sticky info.  But I don't have control over that.

Can you feed SQL queries to the internal database? :B

Like I said, simple queries would be possible with normal info, but until it's possible to register permanent info variables to a particular service, it will be necessary to either write the values to the files' tags, or maintain them in an external storage system. A simple array would do nicely. You can even use the metadb_handles as indexes, for the duration of the process session. The handles would be translated to path/subsong when saving, then to playable_location to metadb_handle on load. (Of course, you'd be wise to do this translation in on_init, once all the components have been loaded and their services registered, etc.)

Whee, fun.
Title: Play Counter
Post by: Zulithe on 2004-05-15 15:28:25
So, adding *.* to "DB Only Mask" will make it only track in the database, and it WON'T write tags to files?

I like this plugin but I don't like components to write tags to my music, I would prefer it in the database always unless I specificy otherwise.

I think this plugin should log this information should be logged by all file types to the DB by default. It's kinda nasty to have it write to the files themselves unless it is a standard tagging format that most other players would recognize (which this isn't, or am i wrong)
Title: Play Counter
Post by: tboehrer on 2004-05-15 21:51:18
Quote
So, adding *.* to "DB Only Mask" will make it only track in the database, and it WON'T write tags to files?

I like this plugin but I don't like components to write tags to my music, I would prefer it in the database always unless I specificy otherwise.


All that will do is defer the write to the file until you specifically tell it to update the file with DB info, or when you do some other tag update operation.  There is currently no way to never write the tags to the file and have the info in the DB.
Title: Play Counter
Post by: Raymond on 2004-05-16 01:09:28
Now I'm still using Playcount v1.2.
I disable DB and block tag update operations in the same time. So the tags are neither stored in files nor DB. But it really does the counting. I have no idea where the tags are but I like this way.
The later versions lost this "feature".
Title: Play Counter
Post by: tboehrer on 2004-05-16 01:31:45
Quote
I disable DB and block tag update operations in the same time. So the tags are neither stored in files nor DB. But it really does the counting. I have no idea where the tags are...


Neither do I.... 
Title: Play Counter
Post by: Silverbolt on 2004-05-16 03:17:13
Quote
I have no idea where the tags are...

Maybe they're being stored in the playlists. Check the .fpl files in "C:\Program Files\foobar2000\playlists\"
Title: Play Counter
Post by: Raymond on 2004-05-16 03:34:07
Quote
Maybe they're being stored in the playlists. Check the .fpl files in "C:\Program Files\foobar2000\playlists\"

You're right! Tags are being stored there.
So, tboehrer, is it possible to add an option to store tags ONLY in .fpl files?
Title: Play Counter
Post by: tboehrer on 2004-05-16 03:37:49
Quote
is it possible to add an option to store tags ONLY in .fpl files?


No clue.  It's not something I control.  That I know of at least. 
Title: Play Counter
Post by: tboehrer on 2004-05-16 03:52:18
You can also check with kode54... he posted some messages saying he was working on a version that writes the tags to an external DB.  I don't know the status of it though.
Title: Play Counter
Post by: Raymond on 2004-05-16 03:52:50
Quote
No clue.  It's not something I control.  That I know of at least. 

I know nothing about foobar plugin programming. But actually v1.2 was already in this way...
Title: Play Counter
Post by: tboehrer on 2004-05-16 04:17:33
Quote
I know nothing about foobar plugin programming. But actually v1.2 was already in this way...


The last version added an option to disable the "skip if not in DB" feature.  It's more likely that when you disabled the DB, the plugin simply ignores the track.  I truly don't have much control over what gets written where... I simply make a call to some SDK code and it does the rest.
Title: Play Counter
Post by: Zulithe on 2004-05-16 10:11:24
Thanks for the reply tboehrer. I will wait for kode54's new version (if it becomes available). Very nice plugin ... once it can write to a DB and not to the files themselves I will be pleased  This is functionaliy from Winamp 5 which I miss in foobar2000
Title: Play Counter
Post by: tboehrer on 2004-05-17 21:52:40
Minor release:

Version 1.5 (May 17 2004)

1) Added julian date format
2) Fixed bug with "Skip tracks not in the DB" not being checked first.


The Julian date is used by specifying either %j or %J in the format.  Use %j to use a julian date without the time fraction, or %J to get the full Julian date.
Title: Play Counter
Post by: leows on 2004-06-20 01:41:54
I searched in the forum, but don't found nothing, then here goes my question:
How can I change:
DDMMYY to YYYY.MM.DD (or YY.MM.DD)
and HHMMSS to HH:MM


I want to show this way in playlist: YYYY.MM.DD - HH:MM
Title: Play Counter
Post by: Paranoia on 2004-06-20 09:30:51
this should do what you want - tell me if it doesn't work as I haven't tested it:
Code: [Select]
$ifgreater($substr(%play_date%,5,6),20,19$substr(%play_date%,5,6),20$substr(%play_date,5,6)).
$substr(%play_date%,3,4).$substr(%play_date%,1,2) -
$substr(%play_time%,1,2):$substr(%play_time%,3,4)


Steve
Title: Play Counter
Post by: Zurman on 2004-06-20 17:31:19
Or if you want a much simplier way, try to put

"%Y.%M.%D" in the play_date tag (in configuration of play_count)

and "$H:$M" in the play_time tags

and then %play_date% - %play_time% in your playlist
Title: Play Counter
Post by: Paranoia on 2004-06-20 17:35:16
^ But that would require reformatting old tags wouldn't it

Steve
Title: Play Counter
Post by: tboehrer on 2004-06-20 17:48:40
Paranoia Posted on Jun 20 2004, 11:35 AM
Quote
^ But that would require reformatting old tags wouldn't it

Steve 


Yes.  The masstagger works well for reformatting.  I would reformat prior to changing the Play Counter format though.
Title: Play Counter
Post by: Zurman on 2004-06-20 17:56:54
Quote
^ But that would require reformatting old tags wouldn't it

Steve

true, I hadn't thought to that

My solution is better on the long run, yours is better on the short term

As tboehrer says, the best is probably to masstag and then change the play_date & time tags configuration
Title: Play Counter
Post by: leows on 2004-06-21 00:10:49
Thanks everybody.

I will change that format of the variables, then use the Paranoia's strings to format it in the playlist.
Andu use masstagger to change the old ones.

Paranoia, your string is buggy, it shows 20TA.06.20 20:12 per example, but that ok, i'll use %Y to get YYYY.
Title: Play Counter
Post by: Go2Null on 2004-06-21 01:44:40
@tboehrer:
I had  a look at your website (http://65.17.81.165/foobar/) but didn't see the 1.5 version. Is that the foo_playcount.dll file?
Also, this looks like a great plug-in, could you have it added to the plug-ins (http://www.hydrogenaudio.org/forums/index.php?showtopic=5209&) page?
Thanks for the great work.
Title: Play Counter
Post by: anza on 2004-06-21 14:10:07
By the way, could you implement an option to update counter when playback percentage is n% OR nminutes? It would be really great for some songs that have hidden tracks (ie looong part of silence in the middle, which one usually just skips).
Title: Play Counter
Post by: spase on 2004-06-24 00:27:51
Quote
Quote
So, adding *.* to "DB Only Mask" will make it only track in the database, and it WON'T write tags to files?

I like this plugin but I don't like components to write tags to my music, I would prefer it in the database always unless I specificy otherwise.


All that will do is defer the write to the file until you specifically tell it to update the file with DB info, or when you do some other tag update operation.  There is currently no way to never write the tags to the file and have the info in the DB.

Just get all the normal tags the way you like it, then write protect all of your files.

Thats what I am doing.

DB will be updated, but files will not.
Title: Play Counter
Post by: studentism on 2004-06-26 02:09:48
Uh, I don't know if this is a problem for anyone else, it could be just me, but if foobar isn't the window in focus, the playcount doesn't update itself.  It isn't a major issue, just a minor inconvenience.  Thanks.
Title: Play Counter
Post by: spase on 2004-06-26 02:28:34
Quote
Uh, I don't know if this is a problem for anyone else, it could be just me, but if foobar isn't the window in focus, the playcount doesn't update itself.  It isn't a major issue, just a minor inconvenience.  Thanks.

I don't get this problem here.

Make sure the file is in the database if you have it set to ignore files not in the database.
Title: Play Counter
Post by: tboehrer on 2004-06-26 04:08:19
QUOTE (studentism @ Jun 25 2004, 08:09 PM)
Quote
Uh, I don't know if this is a problem for anyone else, it could be just me, but if foobar isn't the window in focus, the playcount doesn't update itself. It isn't a major issue, just a minor inconvenience. Thanks.


I don't see that here either.  In fact, 90% of the time, fb2k is minimized to the systray for me.

Of course... that doesn't mean something weird isn't happening... just that without being able to reproduce it, chances are next to nothing I'd be able to fix it.
Title: Play Counter
Post by: studentism on 2004-06-26 04:47:27
Hm, fooling around with it a little more, I've discovered that it's doing it selectively, which leads me to believe it's related to something else other than just the window being out of focus (although when it is in focus, it updates every time).  I guess I'll fiddle around with it a little more and see if I can figure it out.  Thanks.
Title: Play Counter
Post by: BO(V)BZ on 2004-06-27 19:01:02
tboehrer:

I've got a small feature request.  Could you add some shortcuts to increment/decrement [I only need increment, but for sake of completeness, decrement would be good] the playcounter?  I'd like to be able to assign a hotkey to do this so I can change my play counter easily. 

The reason I'm interested is that I put some of my music on my work computer, but I'd like to easily update the PC's on my home computer.  I doubt that this would take too much work, and I'd certainly appreciate it =]

Thanks!
Title: Play Counter
Post by: Silverbolt on 2004-06-27 22:53:07
Quote
I've got a small feature request.  Could you add some shortcuts to increment/decrement... I'd like to be able to assign a hotkey to do this so I can change my play counter easily.

You can do this by using musicmusic's Quick Tag (http://members.lycos.co.uk/musicf/).

Make a new item, enter "PLAY_COUNTER" as the Field Name, "$add(%play_counter%,1)" as the Value, and be sure to check "Use value string to titleformat track for actual value". It'll then become available in the context menu where you can also assign your keyboard shortcut. Cheers.
Title: Play Counter
Post by: BO(V)BZ on 2004-06-28 05:24:25
Silverbolt,

Thanks for the advice, I wasn't aware of that plugin =]  Works just fine, no need to add that feature now, unless you really want to 
Title: Play Counter
Post by: Zoominee on 2004-06-30 20:35:07
@Neksus
Thanks formirroring the foo_playcount file! The "official" download link has been quite hopeless during the last two hours...
Title: Play Counter
Post by: Morgensonne on 2004-07-02 18:46:42
Does anybody use Playcounter for it's cue files? I have a problem to get my cue files updated with the REM Play_counter tags! My questions in "foo_cue_ex" plugin thread can't be solved or reproduced.

thanks & ciao
Title: Play Counter
Post by: saratoga on 2004-07-04 20:33:34
Wow it "just works" without me doing anything or making any attempt to learn abou tit.  Thanks for the great plugin
Title: Play Counter
Post by: tedor on 2004-07-11 15:50:46
one feature request: could you make an option for songs with a lower playcount have a higher chance of being played under random order?
it would imo make this plugin complete. other than that, awesome plugin. just what i was looking for.
Title: Play Counter
Post by: Morgensonne on 2004-07-11 15:57:51
Quote
one feature request: could you make an option for songs with a lower playcount have a higher chance of being played under random order?
[a href="index.php?act=findpost&pid=224896"][{POST_SNAPBACK}][/a]


I think this can not be done through the playcounter plugin, cause the random play order is arranged by the core (if "arrange" is the right word, when talking about "randomize").

If you wanna hear songs with a less playcount, why not "Generate" a playlist and reverse sort by playcount?
Title: Play Counter
Post by: tedor on 2004-07-11 18:08:22
id prefer it be automated.
not worth it otherwise imo. :\
Title: Play Counter
Post by: Go2Null on 2004-07-12 14:57:42
Quote
id prefer it be automated.
not worth it otherwise imo. :\
[a href="index.php?act=findpost&pid=224926"][{POST_SNAPBACK}][/a]


Which leads to, in my opinion, the most required (read: lacking) feature in fb2k - that is, auto-playlists. You define a query and whenever you launch fb2k, or click "refesh", it updates the playlist.
Title: Play Counter
Post by: tboehrer on 2004-07-12 15:59:01
Quote
Which leads to, in my opinion, the most required (read: lacking) feature in fb2k - that is, auto-playlists. You define a query and whenever you launch fb2k, or click "refesh", it updates the playlist.


Wrong thread for this reply, but...

The next version of the Extended Playlist Generator will probably have the "refresh on reload" option.  While it's not as easy as "clicking refresh", the Ext. Playlist Generator has presets which allow you to quickly regen a playlist already.
Title: Play Counter
Post by: Zoominee on 2004-09-06 09:30:45
Hi. Is there something wrong with the binary download link on p1 of this thread? It downloads well, but on execution the file says "This is not a valid Win32 application".

[EDIT] Yes, got it. For some reason, Opera suggests saving the file as .exe, but it's actually a .dll file. If I rename it to .dll, it works.
Title: Play Counter
Post by: eweaverp on 2004-09-20 07:52:31
I've been having problems with this plugin writing tag information to .ogg files? It only works the first time, after that it spits out some errors and can't start any further music streams, so I have to restart foobar. Very odd.

Any clues?
Title: Play Counter
Post by: jesusxl on 2004-11-21 18:41:29
Just to be sure: this plugin extends ID3 tags with three new fields?
If so, is it possible to easily remove these tags again after you've used them?

Another question: if I put all my files in one playlist, how do I sort them by playcount?
So the most played file will appear at the top of the list, and the less played file at the bottom.

Thanks for your great plugin!
Title: Play Counter
Post by: jkwarras on 2004-11-21 20:29:23
Quote
Another question: if I put all my files in one playlist, how do I sort them by playcount?
[a href="index.php?act=findpost&pid=255338"][{POST_SNAPBACK}][/a]

If you're using Column UI, make a column for rating and click on the header of this column.

Anyway to sort if by playcount you can do it with this with 'Custom sort' under preferences:
Code: [Select]
$num(%play_counter%,4)


Or another easy way with Extended PLaylist Generator:
Query: play_counter GREATER 0
Search What: Database
Sort spec: $num(%play_counter%,4) (click on 'reverse')
Title: Play Counter
Post by: foosion on 2004-11-21 20:38:05
Quote
Another question: if I put all my files in one playlist, how do I sort them by playcount?
So the most played file will appear at the top of the list, and the less played file at the bottom.[a href="index.php?act=findpost&pid=255338"][{POST_SNAPBACK}][/a]
From the main menu, choose "Playlist/Sort/Sort by...", enter "$num($sub(9999,%play_count%),4)", click OK. Works without any additional components (apart from foo_playcount of course).
Title: Play Counter
Post by: kode54 on 2004-11-21 23:41:40
Or, %__play_count% if you use my version.
Title: Play Counter
Post by: TedFromAccounting on 2004-11-24 02:17:20
Can anyone tell me how I could convert a play_date of DDMMYY and a play_time of HHMMSS to MM/DD/YY and HH:MM:SS

So for example, right now my play_date field looks like 230904, and i'd like it to be 09/23/04.  My play_time field looks like 171852, and i'd like that to be 17:18:52.

I've looked at the string in a previous post, but im not sure if there's a way i can change it, or if it will even work at all for me. 

Code: [Select]
$ifgreater($substr(%play_date%,5,6),20,19$substr(%play_date%,5,6),20$substr(%play_date,5,6)).
$substr(%play_date%,3,4).$substr(%play_date%,1,2) -
$substr(%play_time%,1,2):$substr(%play_time%,3,4)


Any help would be appreciated.
Title: Play Counter
Post by: Silverbolt on 2004-11-24 05:18:01
Quote
Can anyone tell me how I could convert a play_date of DDMMYY and a play_time of HHMMSS to MM/DD/YY and HH:MM:SS[a href="index.php?act=findpost&pid=255831"][{POST_SNAPBACK}][/a]

Code: [Select]
[$substr(%play_date%,3,4)/$left(%play_date%,2)/$right(%play_date%,2)]
[ - $left(%play_time%,2):$substr(%play_time%,3,4):$right(%play_time%,2)]
Title: Play Counter
Post by: TedFromAccounting on 2004-11-24 23:18:11
Thanks! Works perfect
Title: Play Counter
Post by: MC Escher on 2004-11-26 19:58:02
Hi,

I've been toying with the playcount for the database explorer panel, and somehow I've been able to make it sort for the number of times played, but I would also like to be able to select the top 50 most played songs or the top 50 most played artists (or something like that). Is it possible to add that through some format string?

Currently I have the following line in the preferences:
Code: [Select]
By Playcount|$if(%play_counter%,%play_counter%)


Now the panel looks like:
Code: [Select]
[-] - All Music
__[+] - By album
__[+] - ...
__[-] - By playcount
_______1
_______2
_______etc...


I'ld like it to become something like:
Code: [Select]
[-] - All Music
__[+] - By album
__[+] - ...
__[-] - By playcount
_______Top 50 songs
_______Top 50 artists
_______1
_______2
_______etc...


I'm not sure wether this is the right place to ask it, since it's also a lot about the database explorer panel, but off course also the paycount plug-in.
But all help is appreciated, I'ld love to see this work.
Title: Play Counter
Post by: Zoominee on 2004-11-26 21:26:08
Quote
Just to be sure: this plugin extends ID3 tags with three new fields?
If so, is it possible to easily remove these tags again after you've used them?
[a href="index.php?act=findpost&pid=255338"][{POST_SNAPBACK}][/a]

easiest way toremove these fields is:
1. put all your music into one playlist
2. check foobar setup to find out what the fields are called in Play Count.
3. highlight the entire playlist and use Show file info (multiple items).
4. select the fields that Play Count plugin has created, and remove them. Hit update.
(might take a while, if you have a lot of music)
Title: Play Counter
Post by: crazee_canuck on 2004-12-04 18:56:55
Quote
Quote
Just to be sure: this plugin extends ID3 tags with three new fields?
If so, is it possible to easily remove these tags again after you've used them?
[a href="index.php?act=findpost&pid=255338"][{POST_SNAPBACK}][/a]

easiest way toremove these fields is:
1. put all your music into one playlist
2. check foobar setup to find out what the fields are called in Play Count.
3. highlight the entire playlist and use Show file info (multiple items).
4. select the fields that Play Count plugin has created, and remove them. Hit update.
(might take a while, if you have a lot of music)
[a href="index.php?act=findpost&pid=256327"][{POST_SNAPBACK}][/a]



I'd say it'd probably be easier to create a playlist that only consists of files with only the counter metadata tags, instead of adding all of the files to the playlist.

Go into the Extended Playlist Generator
Enter the query NOT %play_counter% MISSING
Click RUN
Click Create Playlist
Then continue with step 3 above.
Title: Play Counter
Post by: lav-chan on 2004-12-13 18:00:09
Quote
Uh, I don't know if this is a problem for anyone else, it could be just me, but if foobar isn't the window in focus, the playcount doesn't update itself.  It isn't a major issue, just a minor inconvenience.  Thanks.[a href="index.php?act=findpost&pid=220927"][{POST_SNAPBACK}][/a]

Actually, i'm also getting this. I don't know why and i JUST NOW noticed the problem, so i haven't really tried testing it, but i'm getting something like that, it seems. I do know that whenever i'm actually paying attention to foobar (when the window is in focus), it does update, but the console just kind of stops showing updates after a while if it's in the tray. Don't know if that's a coincidence or not.
Title: Play Counter
Post by: grindlestone on 2004-12-30 12:04:52
Would someone here be kind enough to give me some code to make play_date not display "?" for tracks that have not been played (see below)? And also to add a "-" between the D,M, Y as in  30-12-04 instead of 301204 ?

The current code for this column is the simple "%play_date%"

Thanks.

(http://www.uq.edu.au/~zziwilki/fb2k.png)
Title: Play Counter
Post by: anza on 2004-12-30 12:21:02
Make the code this: [%play_date%]
Title: Play Counter
Post by: upNorth on 2004-12-30 22:20:57
Quote
Would someone here be kind enough to give me some code to make play_date not display "?" for tracks that have not been played (see below)? And also to add a "-" between the D,M, Y as in  30-12-04 instead of 301204 ?[a href="index.php?act=findpost&pid=262155"][{POST_SNAPBACK}][/a]
Code: [Select]
[$left(%play_date%,2)-$substr(%play_date%,3,4)-$right(%play_date%,2)]
Title: Play Counter
Post by: grindlestone on 2004-12-30 23:21:02
Wow! Thanks so much for this both of you. My setup is perfect now.

Thanks heaps.
Title: Play Counter
Post by: topdownjimmy on 2005-01-02 22:19:51
Once we're capable of storing playcount metadata in the db only, might it be a good idea to keep track of EVERY time a song is played?  This would come in handy if, say, I wanted to generate a playlist of the 25 songs I listened to most in July of 2004 (i.e., the ones with the most occurences of xx0704 in their extended play_date field).

If there's some other way to do this that already exists, please let me know...thanks!
Title: Play Counter
Post by: tboehrer on 2005-01-03 05:35:44
Quote
Once we're capable of storing playcount metadata in the db only, might it be a good idea to keep track of EVERY time a song is played?  This would come in handy if, say, I wanted to generate a playlist of the 25 songs I listened to most in July of 2004 (i.e., the ones with the most occurences of xx0704 in their extended play_date field).

If there's some other way to do this that already exists, please let me know...thanks!
[a href="index.php?act=findpost&pid=262751"][{POST_SNAPBACK}][/a]



I'm not sure I follow completely.  The plugin already can keep track of every song.  As far as generating a playlist... there is the Extended Playlist generator that can create this sort of thing for you.
Title: Play Counter
Post by: Silverbolt on 2005-01-03 05:50:14
Quote
I'm not sure I follow completely.  The plugin already can keep track of every song.  As far as generating a playlist... there is the Extended Playlist generator that can create this sort of thing for you.[a href="index.php?act=findpost&pid=262788"][{POST_SNAPBACK}][/a]

I think topdownjimmy meant saving an individual play_stamp/etc. for every single time a track was played. If this were the case, then you wouldn't really even need a play_count(er), as it would just be the total amount of timestamps.
Title: Play Counter
Post by: jokull on 2005-01-03 14:19:15
I second the play_stamp method. More logical. I also would like to see the play_stamps stored in a separate DB file.
Title: Play Counter
Post by: tboehrer on 2005-01-03 14:59:02
Quote
I second the play_stamp method. More logical. I also would like to see the play_stamps stored in a separate DB file.
[a href="index.php?act=findpost&pid=262831"][{POST_SNAPBACK}][/a]


kode54 has a version that stores the info in an external DB.  You'll have to do a search to find it.
Title: Play Counter
Post by: Lycox on 2005-01-15 16:05:39
Oh, I need a little bit help, because foo_count doesn't work for me.

I put the dll in the components folder and fb2k shows the dll in the components list but it didn't work.

Help pleez...

Lycox
Title: Play Counter
Post by: PlazzTT on 2005-01-23 00:03:46
Quote
Oh, I need a little bit help, because foo_count doesn't work for me.

I put the dll in the components folder and fb2k shows the dll in the components list but it didn't work.

Help pleez...

Lycox
[a href="index.php?act=findpost&pid=265556"][{POST_SNAPBACK}][/a]


What do you mean by "it didn't work"? Do you mean that a column isn't appearing in your foobar showing the play count? If so, then installing the plugin in the components folder isn't enough, you still need to create a new column in your Columns UI config to show the play count.

Is the foo_count plugin creating new tags on your MP3s? (view file info on an MP3)
Title: Play Counter
Post by: khiloa on 2005-01-23 04:29:10
If I install this I will find that I play about 100 songs over and over and over for sure! 

Looks like everyones doing a fine job on this plugin.
Title: Play Counter
Post by: anykey on 2005-01-27 20:08:52
Quote
You can add this at the end of you code or where ever you want it!!
Code: [Select]
$if(%play_counter%,
$repeat('0',$sub($len2(1000),$len2(%play_counter%)))%play_counter%,0000)

[a href="index.php?act=findpost&pid=204009"][{POST_SNAPBACK}][/a]
WOW Thank You.  Im a bit new to all this. Been searching the forum for most of the afternoon and now I've found it. Thank you Neksus for this code. Works a treat 

Now I need to ensure I have the latest version of play counter.
Title: Play Counter
Post by: topdownjimmy on 2005-01-28 00:36:23
Quote
I second the play_stamp method. More logical. I also would like to see the play_stamps stored in a separate DB file.
[a href="index.php?act=findpost&pid=262831"][{POST_SNAPBACK}][/a]


Could you add an "append" option to foo_playcount?  Then you could do a string search on the play_date field to find every song played on a specific date.  A play_date field might look something like this with the append option selected:

20050101,20050102,20050119

Or something other than a comma as a delimiter.
Title: Play Counter
Post by: jkwarras on 2005-01-28 08:41:42
Quote
Could you add an "append" option to foo_playcount?  Then you could do a string search on the play_date field to find every song played on a specific date.  A play_date field might look something like this with the append option selected:

20050101,20050102,20050119

Or something other than a comma as a delimiter.
[a href="index.php?act=findpost&pid=268714"][{POST_SNAPBACK}][/a]

Yeah, that would be great. Infact that would be the only way to achieve i.e. 'Most played tracks this month' 
Title: Play Counter
Post by: t0m on 2005-01-28 14:47:49
I just can't believe it, the **** plugin changed my tags!!!!!!!!! and now my tag checksums are *****ed!
Title: Play Counter
Post by: jkwarras on 2005-01-28 15:22:35
Quote
I just can't believe it, the **** plugin changed my tags!!!!!!!!! and now my tag checksums are *****ed!
[a href="index.php?act=findpost&pid=268892"][{POST_SNAPBACK}][/a]

Hmmm...if you read this thread you'll notice that it add a play_counter and play_time tag, and tag means...tag the file 

I believe that if you remove all the playcount tags you'll checksum will get back as they were before the tagging.
Title: Play Counter
Post by: topdownjimmy on 2005-01-28 21:11:18
Quote
Quote
Could you add an "append" option to foo_playcount?  Then you could do a string search on the play_date field to find every song played on a specific date.  A play_date field might look something like this with the append option selected:

20050101,20050102,20050119

Or something other than a comma as a delimiter.
[a href="index.php?act=findpost&pid=268714"][{POST_SNAPBACK}][/a]

Yeah, that would be great. Infact that would be the only way to achieve i.e. 'Most played tracks this month' 
[a href="index.php?act=findpost&pid=268807"][{POST_SNAPBACK}][/a]


What's more, this would eliminate the need to manually add ADDED tags...the first entry in PLAY_DATE would serve the same purpose (more or less).
Title: Play Counter
Post by: t0m on 2005-01-29 12:54:26
Quote
Quote
I just can't believe it, the **** plugin changed my tags!!!!!!!!! and now my tag checksums are *****ed!
[a href="index.php?act=findpost&pid=268892"][{POST_SNAPBACK}][/a]

Hmmm...if you read this thread you'll notice that it add a play_counter and play_time tag, and tag means...tag the file 

I believe that if you remove all the playcount tags you'll checksum will get back as they were before the tagging.
[a href="index.php?act=findpost&pid=268901"][{POST_SNAPBACK}][/a]

 

Well, in fact, my id3v2 tags were removed, and "play_counter" & "play_time" were added ... I tried to remove the added tags and add the id3v2 tags, but I just can't find the right checksum .. never mind, only a few albums lost. 

I think a feature that change a single bit of a file should be disabled by default in any plugin or player... foobar never changes anything in the file without the user's permission!
Title: Play Counter
Post by: Olive on 2005-01-29 20:46:16
You're having a point T0m, perhaps "Db only" should be on by default.
Title: Play Counter
Post by: upNorth on 2005-01-29 21:07:37
Quote
You're having a point T0m, perhaps "Db only" should be on by default.[a href="index.php?act=findpost&pid=269232"][{POST_SNAPBACK}][/a]
AFAIK, the problem is that it's impossible, as you simply can't keep only specific tags in DB only. Your only option if you want to use this specific plugin, is to enable "Block tag update operations" (Preferences->Database). The "problem" with that, is that it will disable all tag updates, not only the ones done by this plugin.

Alternatively, you can use kode54's version instead, as it uses an external database.
Title: Play Counter
Post by: Olive on 2005-01-29 23:04:27
Are you sure that it's not possible to alter the db and not the tags? There's a "DB Only Mask" checkbox in the plugins config page, which suggests it is possible -)
Title: Play Counter
Post by: mazy on 2005-01-30 11:57:17
Quote
Are you sure that it's not possible to alter the db and not the tags? There's a "DB Only Mask" checkbox in the plugins config page, which suggests it is possible -)
[a href="index.php?act=findpost&pid=269260"][{POST_SNAPBACK}][/a]

no, it's not. you are confusing two things:

afaik foobar's api makes it possible to prevent tag changes from being written to files at the moment of change (db_only flag in appropriate routines). this info has no effect later on (i.e. it's not being remembered), so these changes could get written to files sooner or later.

'Block tag update operations' option would prevent any writing to files ...
Title: Play Counter
Post by: t0m on 2005-01-30 12:34:46
Quote
Alternatively, you can use kode54's version instead, as it uses an external database.
[a href="index.php?act=findpost&pid=269237"][{POST_SNAPBACK}][/a]

Where can I find that version? I think an external database would be the best solution to the problem.
Title: Play Counter
Post by: kode54 on 2005-01-30 12:55:54
Quote
Quote
Alternatively, you can use kode54's version instead, as it uses an external database.
[{POST_SNAPBACK}][/a] (http://index.php?act=findpost&pid=269237")

Where can I find that version? I think an external database would be the best solution to the problem.
[a href="index.php?act=findpost&pid=269378"][{POST_SNAPBACK}][/a]


[a href="http://www.saunalahti.fi/cse/kode54/foo_playcount.zip]*bo[/url]om* (http://www.saunalahti.fi/cse/kode54/foo_playcount_source.zip)

Now with rather limited support for either sqlite.dll (only my included version) or libmysql.dll, and thanks to my messy coding, no longer depends on pmysql, but still uses PTypes for some very minor crap because I am lazy.
Title: Play Counter
Post by: Fishy Joe on 2005-01-30 14:28:29
Quote
Quote
Are you sure that it's not possible to alter the db and not the tags? There's a "DB Only Mask" checkbox in the plugins config page, which suggests it is possible -)
[a href="index.php?act=findpost&pid=269260"][{POST_SNAPBACK}][/a]

no, it's not. you are confusing two things:

afaik foobar's api makes it possible to prevent tag changes from being written to files at the moment of change (db_only flag in appropriate routines). this info has no effect later on (i.e. it's not being remembered), so these changes could get written to files sooner or later.

'Block tag update operations' option would prevent any writing to files ...
[a href="index.php?act=findpost&pid=269373"][{POST_SNAPBACK}][/a]


I'm not sure what you mean by this, but I've added all my file types to the "DB Only" config option and it works. All the play count tags are stored in the database and my files remain untouched. I don't have "block tag operations" enabled.
Title: Play Counter
Post by: jkwarras on 2005-01-30 15:23:22
Quote
I'm not sure what you mean by this, but I've added all my file types to the "DB Only" config option and it works. All the play count tags are stored in the database and my files remain untouched. I don't have "block tag operations" enabled.
[a href="index.php?act=findpost&pid=269403"][{POST_SNAPBACK}][/a]

I think that when you will update/change your tag files i.e. Artist or whatever, the playcount tags will get tagged into the file. You could try to check it just by open properties of a file that has the playcount tags (that are not written intot he file because you have the 'DB only' option), change a tag (artist or whatever) and hit update file. See if the file has been tagged with playcounter tags 
Title: Play Counter
Post by: 4nt1 on 2005-02-04 06:54:05
Quote
Here is the format I used, I added the time stamp to the code that tboehrer provided.



Code: [Select]
$if(%play_date%,' '$substr(%play_date%,3,4)
|$left(%play_date%,2)|$right(%play_date%,2)' @ '
$left(%play_time%,2):$substr(%play_time%,3,4),
'                 ')

Code: [Select]
The output looks like this at the end of my playlist:
04|13|04 @ 19:33

[a href="index.php?act=findpost&pid=202907"][{POST_SNAPBACK}][/a]


for anyone in australia or england or anywhere else that uses the other way of date formatting i have this currently working in my track info panel

Code: [Select]
This song was played %play_counter% times so far. 
$char(10)
Last played:
$if(%play_date%,' '$left(%play_date%,2)|$substr(%play_date%,3,4)|$right(%play_date%,2)' @ '
$left(%play_time%,2):$substr(%play_time%,3,4),
'                 ')


this swaps the months and the days around to my preferred way
Title: Play Counter
Post by: Zurman on 2005-02-04 15:45:34
Here is the code I use.

Code: [Select]
$if(%play_counter%,$get(bleu)Ce morceau a été joué %play_counter%$get(bleu) fois.
$char(10)$get(bleu)Dernière lecture



$puts(total,$add($right(%play_date%,2),$select($substr(%play_date%,3,4),    $if($strcmp($left(%play_date%,2),04),0,1),$if($strcmp($left(%play_date%,2),04),3,4),4,0,2,5,0,3,6,1,4,6),6,$left(%play_date%,2)))
$select($add(1,$mod($add($get(total),$div($left(%play_date%,2),4)),7)),Samedi,Dimanche,Lundi,Mardi,Mercredi,Jeudi,Vendredi)


$num($right(%play_date%,2),1)$if($strcmp($right(%play_date%,2),01),er) $select($substr(%play_date%,3,4),Janvier,Février,Mars,Avril,Mai,Juin,Juillet,Août,Septembre,Octobre,Novembre,Décembre) 20$left(%play_date%,2)$char(10)
                       $get(bleu)à $left(%play_time%,2):$right($left(%play_time%,4),2)
,$get(bleu)Ce morceau n''a jamais été joué)

The date is sored this way : %y%M%D
And the time : $H$M$S

The advantage of storing this way is that I can easily sort according to the date (and hour) when tracks were played

And the date is displayed this way :
Dernière lecture Vendredi 4 Février 2005 à 16:40

It's in French but translation shouldn't be a problem :
Janvier : January, etc...
Samedi : Saturday etc...
Dernière lecture : last time played
Ce morceau n''a jamais été joué : never played
Title: Play Counter
Post by: 4nt1 on 2005-02-04 23:29:30
Quote
Here is the code I use.

Code: [Select]
$if(%play_counter%,$get(bleu)Ce morceau a été joué %play_counter%$get(bleu) fois.
$char(10)$get(bleu)Dernière lecture



$puts(total,$add($right(%play_date%,2),$select($substr(%play_date%,3,4),    $if($strcmp($left(%play_date%,2),04),0,1),$if($strcmp($left(%play_date%,2),04),3,4),4,0,2,5,0,3,6,1,4,6),6,$left(%play_date%,2)))
$select($add(1,$mod($add($get(total),$div($left(%play_date%,2),4)),7)),Samedi,Dimanche,Lundi,Mardi,Mercredi,Jeudi,Vendredi)


$num($right(%play_date%,2),1)$if($strcmp($right(%play_date%,2),01),er) $select($substr(%play_date%,3,4),Janvier,Février,Mars,Avril,Mai,Juin,Juillet,Août,Septembre,Octobre,Novembre,Décembre) 20$left(%play_date%,2)$char(10)
                       $get(bleu)à $left(%play_time%,2):$right($left(%play_time%,4),2)
,$get(bleu)Ce morceau n''a jamais été joué)

The date is sored this way : %y%M%D
And the time : $H$M$S

The advantage of storing this way is that I can easily sort according to the date (and hour) when tracks were played

And the date is displayed this way :
Dernière lecture Vendredi 4 Février 2005 à 16:40

It's in French but translation shouldn't be a problem :
Janvier : January, etc...
Samedi : Saturday etc...
Dernière lecture : last time played
Ce morceau n''a jamais été joué : never played
[a href="index.php?act=findpost&pid=270908"][{POST_SNAPBACK}][/a]



wow very nice idea indeed, are you using this in your columns or in your track info ?

i would love to be able to sort my colums by most frequently played or last played...

i hope that makes sense
Title: Play Counter
Post by: 4nt1 on 2005-02-04 23:39:08
Code: [Select]
$char(10)
$if(%play_counter%,$get(bleu)This song has been played %play_counter%$get(bleu) times.
$char(10)$get(bleu)Last Played



$puts(total,$add($right(%play_date%,2),$select($substr(%play_date%,3,4), $if($strcmp($left(%play_date%,2),04),0,1),$if($strcmp($left(%play_date%,2),04),3,4),4,0,2,5,0,3,6,1,4,6),6,$left(%play_date%,2)))
$select($add(1,$mod($add($get(total),$div($left(%play_date%,2),4)),7)),Saturday,Sunday,Monday,Tuesday,Wednesday,Thursday,Friday)


$num($right(%play_date%,2),1)$if($strcmp($right(%play_date%,2),01),er) $select($substr(%play_date%,3,4),January,February,March,April,May,June,July,August,September,October,November,December) 20$left(%play_date%,2)$get(bleu) at $left(%play_time%,2):$right($left(%play_time%,4),2)
,$get(bleu)Thisis your first time listening to this song.)


here is the translated,

can you tell me what bleu is for?

also i would like to have if the song has only been played once, then instead of it saying this song has been played 1 times it says 1 time. ie singular instead of plural.


also for the daye i would like to have it be on the actual day be 1st, 2nd, 3rd, 4th etc instead of 1,2,3,4

hope you can understand that?

thanks
Title: Play Counter
Post by: Zurman on 2005-02-05 11:32:38
Quote
wow very nice idea indeed, are you using this in your columns or in your track info ?

i would love to be able to sort my colums by most frequently played or last played...

i hope that makes sense
[a href="index.php?act=findpost&pid=271006"][{POST_SNAPBACK}][/a]
I use this in my track info panel

You can easily create a colum with this info, though you dont need one to sort by last played : just select all your playlist (or double clic on status bar) and then sort>sort by> %play_date%, or even better : %play_date% %play_time%

The advantage of having a dedicated column is that this can be done in just one clic 
Title: Play Counter
Post by: Zurman on 2005-02-05 11:43:40
Quote
Code: [Select]
$char(10)
$if(%play_counter%,$get(bleu)This song has been played %play_counter%$get(bleu) time$if($greater(%play_counter%,1),s).
$char(10)$get(bleu)Last Played



$puts(total,$add($right(%play_date%,2),$select($substr(%play_date%,3,4), $if($strcmp($left(%play_date%,2),04),0,1),$if($strcmp($left(%play_date%,2),04),3,4),4,0,2,5,0,3,6,1,4,6),6,$left(%play_date%,2)))
$select($add(1,$mod($add($get(total),$div($left(%play_date%,2),4)),7)),Saturday,Sunday,Monday,Tuesday,Wednesday,Thursday,Friday)


 $num($right(%play_date%,2),1)
$select($right(%play_date%,2),st,nd,rd,th,th,th,th,th,th,th,th,th,th,th,th,th,th,th,th,th,st,nd,rd,th,th,th,th,th,th,th,st)
$select($substr(%play_date%,3,4),January,February,March,April,May,June,July,August,September,October,November,December) 20$left(%play_date%,2)$get(bleu) at $left(%play_time%,2):$right($left(%play_time%,4),2)
,$get(bleu)This is your first time listening to this song.)


here is the translated,

can you tell me what bleu is for?

also i would like to have if the song has only been played once, then instead of it saying this song has been played 1 times it says 1 time. ie singular instead of plural.


also for the daye i would like to have it be on the actual day be 1st, 2nd, 3rd, 4th etc instead of 1,2,3,4

hope you can understand that?

thanks
[a href="index.php?act=findpost&pid=271008"][{POST_SNAPBACK}][/a]

This should work
"bleu" is just a color, I have "$puts(bleu,918377)" at the begining of the panel, but you can put whatever color you want (bleu means blue in French)

Ooops, this will put you 31th ... Well, let's be "bestial"
Title: Play Counter
Post by: 4nt1 on 2005-02-06 14:05:28
very nice indeed thankyou very much
Title: Play Counter
Post by: wortels on 2005-02-07 11:41:15
can anyone format this
Code: [Select]
$if(%play_counter%,$get(info)Last Played: $get(text) $puts(total,$add($right(%play_date%,2),$select($substr(%play_date%,3,4), $if($strcmp($left(%play_date%,2),04),0,1),$if($strcmp($left(%play_date%,2),04),3,4),4,0,2,5,0,3,6,1,4,6),6,$left(%play_date%,2)))
$select($add(1,$mod($add($get(total),$div($left(%play_date%,2),4)),7)),Saturday,Sunday,Monday,Tuesday,Wednesday,Thursday,Friday) $num($right(%play_date%,2),1)$if($strcmp($right(%play_date%,2),01),er) $select($substr(%play_date%,3,4),January,February,March,April,May,June,July,August,September,October,November,December) 20$left(%play_date%,2) at $left(%play_time%,2):$right($left(%play_time%,4),2)
,$get(info)This is your first time listening to this song.)$char(10)

To show AM PM as well?
Thanks
Title: Play Counter
Post by: anykey on 2005-02-08 13:20:38
Quote
can anyone format this
Code: [Select]
$if(%play_counter%,$get(info)Last Played: $get(text) $puts(total,$add($right(%play_date%,2),$select($substr(%play_date%,3,4), $if($strcmp($left(%play_date%,2),04),0,1),$if($strcmp($left(%play_date%,2),04),3,4),4,0,2,5,0,3,6,1,4,6),6,$left(%play_date%,2)))
$select($add(1,$mod($add($get(total),$div($left(%play_date%,2),4)),7)),Saturday,Sunday,Monday,Tuesday,Wednesday,Thursday,Friday) $num($right(%play_date%,2),1)$if($strcmp($right(%play_date%,2),01),er) $select($substr(%play_date%,3,4),January,February,March,April,May,June,July,August,September,October,November,December) 20$left(%play_date%,2) at $left(%play_time%,2):$right($left(%play_time%,4),2)
,$get(info)This is your first time listening to this song.)$char(10)

To show AM PM as well?
Thanks
[a href="index.php?act=findpost&pid=271514"][{POST_SNAPBACK}][/a]

I copied this into my columns, it looks good, however, the year is displayed as 2011, 2018, or sometime in the future.     
I should be grateful if you could correct the year for me.
Title: Play Counter
Post by: wortels on 2005-02-08 14:26:51
just noticed happens with mine too
Title: Play Counter
Post by: Olive on 2005-02-08 15:04:04
Because he might be using %y%M%D for PLAY_DATE, eg today is 050208.
Edit: As for AM/PM, it seems to me that at least one or two peeps have already posted their method in the track info pannel topic or somewhere near
Title: Play Counter
Post by: topdownjimmy on 2005-02-08 19:06:45
Quote
can anyone format this
Code: [Select]
$if(%play_counter%,$get(info)Last Played: $get(text) $puts(total,$add($right(%play_date%,2),$select($substr(%play_date%,3,4), $if($strcmp($left(%play_date%,2),04),0,1),$if($strcmp($left(%play_date%,2),04),3,4),4,0,2,5,0,3,6,1,4,6),6,$left(%play_date%,2)))
$select($add(1,$mod($add($get(total),$div($left(%play_date%,2),4)),7)),Saturday,Sunday,Monday,Tuesday,Wednesday,Thursday,Friday) $num($right(%play_date%,2),1)$if($strcmp($right(%play_date%,2),01),er) $select($substr(%play_date%,3,4),January,February,March,April,May,June,July,August,September,October,November,December) 20$left(%play_date%,2) at $left(%play_time%,2):$right($left(%play_time%,4),2)
,$get(info)This is your first time listening to this song.)$char(10)

To show AM PM as well?
Thanks
[a href="index.php?act=findpost&pid=271514"][{POST_SNAPBACK}][/a]


Where do the "info" and "text" variables come from?
Title: Play Counter
Post by: wortels on 2005-02-08 19:46:13
juet formatting strings
Title: Play Counter
Post by: wortels on 2005-02-09 16:16:25
I think I fixed the improper display thing
Code: [Select]
$if(%play_counter%,$get(info)Last Played: $get(text) $puts(total,$add($left(%play_date%,2),$select($left(%play_date%,2), $if($strcmp($substr(%play_date%,3,4),04),0,1),$if($strcmp($left(%play_date%,2),04),3,4),4,0,2,5,0,3,6,1,4,6),6,$substr(%play_date%,3,4)))
$select($add(1,$mod($add($get(total),$div($substr(%play_date%,3,4),4)),7)),Saturday,Sunday,Monday,Tuesday,Wednesday,Thursday,Friday) $num($left(%play_date%,2),1)$if($strcmp($right(%play_date%,2),01),er) $select($substr(%play_date%,3,4),January,February,March,April,May,June,July,August,September,October,November,December) $right(%play_date%,4) at $left(%play_time%,2):$right($left(%play_time%,4),2)
,$get(info)This is your first time listening to this song.)$char(10)


Can someone tell me what is the default format used "%D%M%Y" or "%M%D%Y"


Now to do AM PM thingy
Title: Play Counter
Post by: tboehrer on 2005-02-09 16:31:39
Quote
Can someone tell me what is the default format used "%D%M%Y" or "%M%D%Y"


The default is %D%M%y.

I use %Y%M%D$H$M$S.  This gives a combined date + time and allows sorting by last played.
Title: Play Counter
Post by: wortels on 2005-02-09 16:58:48
Has someone done the AM/PM thing using %play_time% couldnt find in this thread
Title: Play Counter
Post by: krazy on 2005-02-10 15:27:16
This is a section of the code I use in my Track Info panel:
Code: [Select]
$puts(Last_played,$select(1,
$if($meta_test(PLAY_DATE),
$puts(month,$select($substr($meta(PLAY_DATE),3,4),
'January','February','March','April','May','June','July','August','September','October','November','December',))
$left($meta(PLAY_DATE),2)' '$get(month)' 20'$right($meta(PLAY_DATE),2)', '
),$meta(PLAY_DATE))

$if([$meta(PLAY_TIME)],
$ifgreater($meta(PLAY_TIME),130000,$sub($substr($meta(PLAY_TIME),1,2),12),$ifgreater(1,$substr($meta(PLAY_TIME),1,2),'12',$substr($meta(PLAY_TIME),1,2)))':'$substr($meta(PLAY_TIME),3,4)
//':'$substr($meta(PLAY_TIME),5,6)
$ifgreater($meta(PLAY_TIME),120000,' pm',' am'),'Never'
)
)


Remove the '//' if you want seconds too
Title: Play Counter
Post by: wortels on 2005-02-10 18:37:57
thanks a lot crazy
Title: Play Counter
Post by: Lyx on 2005-02-17 00:01:16
tboehrer:

please give this thread a read and drop in your opinion:
http://www.hydrogenaudio.org/forums/index....showtopic=31530 (http://www.hydrogenaudio.org/forums/index.php?showtopic=31530)

From looking at the sources, it seems quite easy to change the default to the proposed standard in the above thread. But i guess it would be a better idea (if you want to) when you would officially change the default instead of someone else changing the source and compiling it.

- Lxc
Title: Play Counter
Post by: beto on 2005-02-21 02:28:34
Quote
Quote
Quote
Alternatively, you can use kode54's version instead, as it uses an external database.
[{POST_SNAPBACK}][/a] (http://index.php?act=findpost&pid=269237")

Where can I find that version? I think an external database would be the best solution to the problem.
[a href="index.php?act=findpost&pid=269378"][{POST_SNAPBACK}][/a]


[a href="http://www.saunalahti.fi/cse/kode54/foo_playcount.zip]*bo[/url]om* (http://www.saunalahti.fi/cse/kode54/foo_playcount_source.zip)

Now with rather limited support for either sqlite.dll (only my included version) or libmysql.dll, and thanks to my messy coding, no longer depends on pmysql, but still uses PTypes for some very minor crap because I am lazy.
[a href="index.php?act=findpost&pid=269381"][{POST_SNAPBACK}][/a]


Is this incompatible with mysql under 4.1.x ? I cannot use it with mysql 4.0.23....
I receive the following error when hitting the create tavle button:

(http://sites.uol.com.br/disco_virtual/grfi/compartilhada/geral/error_mysql.PNG)

please, any guidance would be appreciated.
Title: Play Counter
Post by: kode54 on 2005-02-21 08:13:07
Apparently, it is. Either update the server, or use SQLite.
Title: Play Counter
Post by: beto on 2005-02-21 13:49:25
Quote
Apparently, it is. Either update the server, or use SQLite.
[a href="index.php?act=findpost&pid=275552"][{POST_SNAPBACK}][/a]


Server update is not feasible ATM because I run other databases that still cannot be converted to 4.1, due to lack of proper php4 support in windows...

Will give sqlite a shot.

thanks for the info.
Title: Play Counter
Post by: beto on 2005-02-21 23:53:19
Can't make it work with SQLite either... I always get this (http://sites.uol.com.br/disco_virtual/grfi/compartilhada/geral/failure_00000005.txt) crash. when hitting the button test.

Is there any readme/tutorial on installing this plugin with sqlite?

If anyone could help me I would appreciate.
Title: Play Counter
Post by: beto on 2005-02-23 00:11:29
@kode54
I know that you are a busy man and one of the most savvy plugin developers here at HA and sorry for insisting in this issue, but I really am having a hard time doing this work with sqlite...

I am really interested, but so far I had no success.

I would appreciate a small tutorial (for the sqlite total noob) from you or from any other person that successfully achieved playcount working with sqlite...

thanks again
Title: Play Counter
Post by: dano on 2005-02-23 00:31:48
beto have you put the sqlite.dll in the foobar2000 dir (same location as foobar2000.exe) and not the components dir? basically that's all you need...
and ofc kode54's foo_playcount.dll in the components dir
Title: Play Counter
Post by: beto on 2005-02-23 03:23:31
thanks. now it's working.
Title: Play Counter
Post by: kode54 on 2005-02-23 05:34:03
Yeah, sorry, maybe I should include a readme.
Title: Play Counter
Post by: jkwarras on 2005-02-23 10:38:00
kode54, your version works great thanks you. Now I can safely use playcounts without touching my files 

Wouldn't be better if this version were on the components database and/or be available on the first page of this thread or it's own thread? It's really hard to find it (unless you're really looking for it), ad I think it's does what a lot of users wants: add playcount without tagging the file. I'm sure a lot of users will use this component instead of the original one if they knew it exist and it's so damn easy to install (because when you see that you need SQL stuff, blabla it scares a lot of people (like me the first time) that think you have to install the whole SQL stuff).

Some questions comes to my mind:

- It's this multi-users aware? I mean, does it store my counts separetly for different users accounts?
- Can I reset the playcounts?
- Where is the info stored, in the sqlite.dll file (sorry if I'm dumb  )?
- I guess it could be great if we could have a append function, I mean as requested by someone around here, keep track of everytime a file has been played, as it would allow stuff like 'top played last month' etc...
- And could this approach (store info in SQlite) be implemented in another plugins like rating, etc...)? Because that woud be great to be able to store personal info in a external database, yum....  (i.e. if someone would be interested in making foo_quicktag use sqlite.dll...)

BTW, would you be interested in implementing this (http://www.hydrogenaudio.org/forums/index.php?showtopic=20719&view=findpost&p=274338)this?
It'll be as simple as setting last_played field as default with the following format %Y-%m-%d %H:%M:%S.
Edit: Sorry, not so simple because it also needs to implement a first_played field.

Thanks in advance.
Title: Play Counter
Post by: beto on 2005-02-23 12:40:24
Sorry, but I think I precipitated myself... Apparently my noobness has no limits 

Apparently the sqlite DB is being accessed successfully, nevetheless I cannot see any playcount information in my playlists. Do I need a special plugin/script of some sort to extract this information to the playlists (with the regular playcount plugin it works flawlessly)?

Another thing: what does the Resync button do?

Thank you again!!
Title: Play Counter
Post by: dano on 2005-02-23 13:15:37
To check if sqlite updates playcounts, you can check the file modification date of the the new "playcount.db" file in the foobar2000 dir or just in the file properties (Technical info).
And you must use %__play_counter% instead of %_play_counter%
also discussed here (http://www.hydrogenaudio.org/forums/index.php?showtopic=31506&view=findpost&p=274274)
Title: Play Counter
Post by: beto on 2005-02-23 13:43:51
thank you very much dano.
Title: Play Counter
Post by: jkwarras on 2005-02-23 13:50:37
Quote
- Where is the info stored, in the sqlite.dll file (sorry if I'm dumb   )?
[a href="index.php?act=findpost&pid=276247"][{POST_SNAPBACK}][/a]

Quote
you can check the file modification date of the the new "playcount.db" file in the foobar2000 dir or just in the file properties (Technical info).

Ok, now I know that I'm really dumb 
Title: Play Counter
Post by: beto on 2005-02-23 13:51:03
To summarize (and help others that may bump into the same problems I had):

Playcount with SQLite how to

1.  Get the playcount plugin with SQLite support from kode54's page here (http://www.saunalahti.fi/cse/kode54/foo_playcount.zip).
2.  Extract foo_playcount.dll to the components directory and SQLite.dll to foobar's root directory
3.  Start foobar
4.  Configure the playcount plugin to use SQLite in the preferences dialog

To access the playcount information treat the playcount "tags" as technical fields, ie, use %__play_time% instead of %_play_time% in your scripts.

Thanks again for the always precise help of users and developers of this forum.
Title: Play Counter
Post by: jkwarras on 2005-02-23 16:15:49
@kode54:

I've noticed that if I load properties (under fb2k) and I hit 'reload info from file' the playcount and playtime dissapears. If I close and reload again it's still there but if I hit 'reload info from file' and then 'update info' all the playcount info dissapears and if I  close and reload it's not there anymore. It's this intended or normal behaviour?

BTW, does someone knows how can I transfer my playcounts from %play_counter% to %__play_counter%? I can do it the other way ( from %__play_counter% to %play_counter%) via masstagger but doesn't work the other way or I don't know how to do it 
Title: Play Counter
Post by: Killmaster on 2005-02-25 04:38:47
Everything in the play count prefs is greyed out, and it's adding a play_stamp field (as suggested earlier in this thread) but its not recognizing all the variables. 

Here's what I mean:

PLAY_STAMP = 2005-12-T$H:$M:$S$T

It recognizes year and month, but nothing else. Also, is there a way to erase certain entries in the database or anything?
Title: Play Counter
Post by: gob on 2005-02-25 05:49:27
this sql plugin sounds great. if only there was a way to get the ratings into it.
also, with this plugin, how does it associate tags with the songs? does it go by path? is it possible to move files to different directories and retain thier entry in the sql db?
Title: Play Counter
Post by: jkwarras on 2005-02-25 08:31:32
Quote
PLAY_STAMP = 2005-12-T$H:$M:$S$T

It recognizes year and month, but nothing else.
[{POST_SNAPBACK}][/a] (http://index.php?act=findpost&pid=276850")

If you hit 'help' you'll get into [a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_strftime.2c_.wcsftime.asp]this[/url] MS information page that explain all the variables that you can use in this plugin. This mod version uses that code instead of the code from default foo_playcount version.

Here's the code that you can use in the optional fields:
Code: [Select]
%a 
Abbreviated weekday name
%A
Full weekday name
%b
Abbreviated month name
%B
Full month name
%c
Date and time representation appropriate for locale
%d
Day of month as decimal number (01 – 31)
%H
Hour in 24-hour format (00 – 23)
%I
Hour in 12-hour format (01 – 12)
%j
Day of year as decimal number (001 – 366)
%m
Month as decimal number (01 – 12)
%M
Minute as decimal number (00 – 59)
%p
Current locale's A.M./P.M. indicator for 12-hour clock
%S
Second as decimal number (00 – 59)
%U
Week of year as decimal number, with Sunday as first day of week (00 – 53)
%w
Weekday as decimal number (0 – 6; Sunday is 0)
%W
Week of year as decimal number, with Monday as first day of week (00 – 53)
%x
Date representation for current locale
%X
Time representation for current locale
%y
Year without century, as decimal number (00 – 99)
%Y
Year with century, as decimal number
%z, %Z
Either the time-zone name or time zone abbreviation, depending on registry settings; no characters if time zone is unknown
%%
Percent sign



For your tag you'll need to use this:

Code: [Select]
play_stamp=%Y-%m-%d %H:%M:%S

...which is the equivalent to
Code: [Select]
play_stamp=%Y-%M-%D $H:$M:$S

...in the default version.

BTW, I suggest to to take a look at this thread (http://www.hydrogenaudio.org/forums/index.php?showtopic=31530)thread, where the new recommended playcount stamp tag is %last_played% (is the one that developpers will support in future components).
So your code should be:
Code: [Select]
last_played%=%Y-%M-%D $H:$M:$S


Hope that helps
Title: Play Counter
Post by: jkwarras on 2005-02-25 08:38:18
Quote
this sql plugin sounds great. if only there was a way to get the ratings into it.
[{POST_SNAPBACK}][/a] (http://index.php?act=findpost&pid=276860")

I hope that some developper will get interested in implementing [a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=31803]my request[/url] 
Title: Play Counter
Post by: jkwarras on 2005-02-25 12:39:37
Quote
BTW, does someone knows how can I transfer my playcounts from %play_counter% to %__play_counter%? I can do it the other way ( from %__play_counter% to %play_counter%) via masstagger but doesn't work the other way or I don't know how to do it 
[a href="index.php?act=findpost&pid=276327"][{POST_SNAPBACK}][/a]

So I guess it's not possible.... 
Title: Play Counter
Post by: foosion on 2005-02-25 12:48:26
Quote
So I guess it's not possible....  [a href="index.php?act=findpost&pid=276947"][{POST_SNAPBACK}][/a]
Correct.
Title: Play Counter
Post by: jkwarras on 2005-02-25 16:23:07
Quote
Quote
So I guess it's not possible....  [a href="index.php?act=findpost&pid=276947"][{POST_SNAPBACK}][/a]
Correct.
[a href="index.php?act=findpost&pid=276952"][{POST_SNAPBACK}][/a]

kode54, could it be possible for you to add an option to transfer playcounts from %play_counter% to %__play_counter%? (as well as the other playcount fields?). Thanks.
Title: Play Counter
Post by: banjobacon on 2005-02-25 20:41:06
Quote
So your code should be:
Code: [Select]
last_played%=%Y-%M-%D $H:$M:$S


Hope that helps
[a href="index.php?act=findpost&pid=276894"][{POST_SNAPBACK}][/a]


Don't you mean...

Code: [Select]
last_played%=%Y-%m-%d %H:%M:%S


...?

EDIT: Lowered the case on a couple of letters.
Title: Play Counter
Post by: Killmaster on 2005-02-25 21:39:51
Quote
Quote
Quote
So I guess it's not possible....  [a href="index.php?act=findpost&pid=276947"][{POST_SNAPBACK}][/a]
Correct.
[a href="index.php?act=findpost&pid=276952"][{POST_SNAPBACK}][/a]

kode54, could it be possible for you to add an option to transfer playcounts from %play_counter% to %__play_counter%? (as well as the other playcount fields?). Thanks.
[a href="index.php?act=findpost&pid=277001"][{POST_SNAPBACK}][/a]



Well, I got it all set up nicely now.. merging the two tags with TAGZ is really quite simple, what I did was use $puts(lastPlayed,$if2(%__last_played%,%last_played%)) and then replaced everything with $get(lastPlayed).. playcounts are also pretty simple, just use $add(%__play_counter%,%play_counter%).
Title: Play Counter
Post by: Lyx on 2005-02-25 21:42:24
Quote
Don't you mean...

Code: [Select]
last_played%=%Y-%m-%d %H:%M:%S


...?
[a href="index.php?act=findpost&pid=277089"][{POST_SNAPBACK}][/a]


There is also a missing % at the beginning.
Title: Play Counter
Post by: jkwarras on 2005-02-25 22:14:28
Quote
Don't you mean...

Code: [Select]
last_played%=%Y-%m-%d %H:%M:%S

[a href="index.php?act=findpost&pid=277089"][{POST_SNAPBACK}][/a]

Ups, yes, sorry...
Title: Play Counter
Post by: jkwarras on 2005-02-25 22:19:49
Quote
Well, I got it all set up nicely now.. merging the two tags with TAGZ is really quite simple, what I did was use $puts(lastPlayed,$if2(%__last_played%,%last_played%)) and then replaced everything with $get(lastPlayed).. playcounts are also pretty simple, just use $add(%__play_counter%,%play_counter%).
[a href="index.php?act=findpost&pid=277100"][{POST_SNAPBACK}][/a]

Thanks, but this works only to display the sum of all both values if present. But what I want is to transfer count from %play_count% tag to %__play_count% metadata so I can erase %play_count% tags. (idem for %last_played%)
Title: Play Counter
Post by: Aero on 2005-02-26 22:15:06
jkwarras asked (http://www.hydrogenaudio.org/forums/index.php?showtopic=19156&view=findpost&p=276249) me to take a look at Kode54's version of foo_playcount to see if I could make my foo_pod (http://www.hydrogenaudio.org/forums/index.php?showtopic=19156) iPod component work with this to synchronize play counts/dates without writing metadata to the original files.

I followed the same basic steps posted here (http://www.hydrogenaudio.org/forums/index.php?showtopic=20719&view=findpost&p=276290) (although I don't have an option to choose which database to use...persumably because I only have sqlite.dll installed).  I am able to test that SQLite is working correctly, which creates the playcount.db file.  But the database file is never created if I don't do Test, and it is never written to as a result of normal file playback.

Are there any other settings that I need to look at in order to make this component work?


Also, I was briefly looking over the source, and it looks like it might not work as is with foo_pod.  foo_pod will need to sum the play counts from foo_playcount with those from the iPod, but it looks like foo_playcounter is only set up to store play counts that it has detected (via play_callback).  In particular, I think there will need to be an implementation for metadb_callback::on_info_edited() that stores the edited value to the database.
Title: Play Counter
Post by: Killmaster on 2005-02-27 06:05:18
Quote
Quote
Well, I got it all set up nicely now.. merging the two tags with TAGZ is really quite simple, what I did was use $puts(lastPlayed,$if2(%__last_played%,%last_played%)) and then replaced everything with $get(lastPlayed).. playcounts are also pretty simple, just use $add(%__play_counter%,%play_counter%).
[a href="index.php?act=findpost&pid=277100"][{POST_SNAPBACK}][/a]

Thanks, but this works only to display the sum of all both values if present. But what I want is to transfer count from %play_count% tag to %__play_count% metadata so I can erase %play_count% tags. (idem for %last_played%)
[a href="index.php?act=findpost&pid=277106"][{POST_SNAPBACK}][/a]

Obviously, that would be the ideal situation.. for now though, it keeps Foobar from making any additional changes to the files, which is nice for certain file sharing programs that keep changing the hash everytime I play a song
Title: Play Counter
Post by: jkwarras on 2005-02-27 22:24:03
Quote
But the database file is never created if I don't do Test, and it is never written to as a result of normal file playback.
[a href="index.php?act=findpost&pid=277366"][{POST_SNAPBACK}][/a]

Normally you shoudl be seeing a play_counter entry in the metadata (right side in properties window, in teh same place as replaygain values, etc...). if this is not there something is going wrong, but I don't know what....
Title: Play Counter
Post by: beto on 2005-03-01 02:24:34
Quote
Quote
Apparently, it is. Either update the server, or use SQLite.
[{POST_SNAPBACK}][/a] (http://index.php?act=findpost&pid=275552")


Server update is not feasible ATM because I run other databases that still cannot be converted to 4.1, due to lack of proper php4 support in windows...

Will give sqlite a shot.

thanks for the info.
[a href="index.php?act=findpost&pid=275617"][{POST_SNAPBACK}][/a]


Finally I updated my Mysql installation and got the playcount plugin working. However I am getting strange characters in the URL field. See [a href="http://sites.uol.com.br/disco_virtual/grfi/compartilhada/geral/mysql.PNG]here[/url].

Apparently it is a UTF-8 issue related to portuguese characters, but I am unable to solve it.

I am using the utf8_unicode_ci collation in this database, if this helps.

Does anyone (kode54?) know how to solve this??

Many thanks
Title: Play Counter
Post by: jkwarras on 2005-03-21 17:48:44
I'm using playcount mod version (kode54) and everything was working fine, but yesterday I was setting the fb2k of another user on the same pc (multiple user enabled in fb2k) and I copied my playcount.db file in the other user appropiate folder (so he doesn't start at 0), then I resync in preferences and all playcounts appear as expected. Then switching to my fb2k I noticed today that my tracks are showing the right playcounts but when I play a track the playcount restart at 0 (i.e. a track with 10 playcounts gets a 1 instead of 11).

Someone knows what can be going on? 

Thanks.
Title: Play Counter
Post by: edm107 on 2005-03-21 22:54:43
Can anyone tell me how this playcount with external DB work?.. i have install the plugin but i don't know how to use. The "CREATE TABLE" button is not available (I don't know why).. only "RESYNC" & "TEST" buttons are available.
Please help me to fix that! Thank you!
Title: Play Counter
Post by: beto on 2005-03-22 00:12:29
read the thread. recently i put a small tutorial to make it work with sqlite...

see here:

http://www.hydrogenaudio.org/forums/index....ndpost&p=276290 (http://www.hydrogenaudio.org/forums/index.php?showtopic=20719&view=findpost&p=276290)



edit: added link
Title: Play Counter
Post by: drbeachboy on 2005-03-27 23:36:55
I wanted to let kode know that there is a problem updating tags in flac files with embedded cuesheets. It is making foobar2000 v0.8.3 crash, by hanging after clicking the "Update" button. Actually, it was a "Not Responding". It is also happening with "foo_quicktag_sql_1.0", as well. Could the sqlite.dll be causing a conflict? Also, I tried running each separately, but still the same problem. Removing them cleared the problem right up.
Title: Play Counter
Post by: fabiospark on 2005-03-28 17:17:12
I read the Beto tut but after downloading and copying I have the commands in the config all greyed out. I checked and I'm sure I have sqlite.dll in the foobar dir and the foo_playcount in the component dir.

Is there a way to unlock the thing?

Thanks


Edit:

I played a track, closed and opened FB a couple of times and now "test" and resync" are not grayed out any more. I clicked on test and then went to see in the dir: now there is that playcount.db that was missing.
Now i'll do some testing to see if everything is OK.
Title: Play Counter
Post by: drbeachboy on 2005-03-28 17:22:01
Quote
I read the Beto tut but after downloading and copying I have the commands in the config all greyed up. I checked and I'm sure I have sqlite.dll in the foobar dir and the foo_playcount in the component dir.

Is there a way to unlock the thing?

Thanks
[a href="index.php?act=findpost&pid=286385"][{POST_SNAPBACK}][/a]

Try closing, then re-starting foobar2000. Press Re-sync and you should be good to go.
Title: Play Counter
Post by: fabiospark on 2005-03-28 17:49:45
Quote
Quote
I read the Beto tut but after downloading and copying I have the commands in the config all greyed up. I checked and I'm sure I have sqlite.dll in the foobar dir and the foo_playcount in the component dir.

Is there a way to unlock the thing?

Thanks
[a href="index.php?act=findpost&pid=286385"][{POST_SNAPBACK}][/a]

Try closing, then re-starting foobar2000. Press Re-sync and you should be good to go.
[a href="index.php?act=findpost&pid=286387"][{POST_SNAPBACK}][/a]


Thank you for the reply: it seems to work.

At least on my test PC.

I did the same on the actual "jukebox" but I don't see it work.

The playcount.db is not updated.

Any hint? Or any other info needed?


Edit:  don't ask me why but it started working on the other PC too.
          I just reloaded all my tracks in one big playlist and now it's going. Boh!?!

WHat does the "resync" and "create table" do? Thanks.
Title: Play Counter
Post by: drbeachboy on 2005-03-28 18:23:43
The "Create table" button has never not been ghosted, so I'm not sure why it is there. The "Test" button seems to create the ".db" file  and "Resync" seems to set it up, and that's all I can tell you. Hopefully, the author can further clarify what's happening.
Title: Play Counter
Post by: edm107 on 2005-03-28 23:19:11
Quote
The "Create table" button has never not been ghosted, so I'm not sure why it is there. The "Test" button seems to create the ".db" file  and "Resync" seems to set it up, and that's all I can tell you. Hopefully, the author can further clarify what's happening.
[a href="index.php?act=findpost&pid=286409"][{POST_SNAPBACK}][/a]


Thank you!!
Title: Play Counter
Post by: war59312 on 2005-04-09 03:39:59
Hey,

Well I am trying to get Kode54 version to work.

I am using for play_date:

%D%M%y

Which is the default.

So I added this column but its not working as expected:

[$left(%__play_date%,2)-$substr(%__play_date%,3,4)-$right(%__play_date%,2)]

Like atm its showing:

32-05-05

And even __play_date by itself shows:

3205

And it keeps chaning when playing. Makes not since to me. Like the next time i played the song again it changed the 32 to 36. So wtf?

As the normal play count one worked fine before this and still does if I complete refert back.

Oddly enough __play_counter works as expected:

$if(%__play_counter%,
$repeat('0',$sub($len2(10),$len2(%__play_counter%)))%__play_counter%,00)

Also for the song under tech info it shows:

PLAY_TIME = $H$M$S
play_counter = 11
play_timestamp = 63248611159765
PLAY_DATE = 3905

So play_time is not working either. As it shows just $H$M$S like it says there. But see play_date is fine.

Any help would be great.

Finally figured it out.

For yours I have to use %m%d%d%y for some reason even though default for orgianl plug retruns the same result. Strange.

And I am getting this error when shutting down foobar.

Appears to be random atm.

(http://img85.exs.cx/img85/8109/wtferror3oy.png)
Title: Play Counter
Post by: war59312 on 2005-04-09 04:32:20
Quote
I'm using playcount mod version (kode54) and everything was working fine, but yesterday I was setting the fb2k of another user on the same pc (multiple user enabled in fb2k) and I copied my playcount.db file in the other user appropiate folder (so he doesn't start at 0), then I resync in preferences and all playcounts appear as expected. Then switching to my fb2k I noticed today that my tracks are showing the right playcounts but when I play a track the playcount restart at 0 (i.e. a track with 10 playcounts gets a 1 instead of 11).

Someone knows what can be going on?  

Thanks.
[a href="index.php?act=findpost&pid=284227"][{POST_SNAPBACK}][/a]

Sure, here you go:

Code: [Select]
[$if(%__play_counter%,
$repeat('0',$sub($len2(10),$len2(%__play_counter%)))%__play_counter%,00)]


Does not show at all if not played at least once. So does not show up when listening to shoutcast either for example.

If played 1-9 it shows, 01-09 and more than 10 is like 10-99...

Does this work with more than 99, dont know? Sure u just change 10 to 100 or however many zero places u want I guess. Though doubt I will ever listen to a song more than 99 times so....

I personaly use 1 since never more than 9 times....so it shows 1-9 as 1-9 instead of 01-09....
Title: Play Counter
Post by: krazy on 2005-05-11 10:58:10
Quote
And I am getting this error when shutting down foobar.

Appears to be random atm.

(http://img85.exs.cx/img85/8109/wtferror3oy.png)
[a href="index.php?act=findpost&pid=289239"][{POST_SNAPBACK}][/a]

I'm also getting this. It disappears when I remove kode's playcount plugin. Anyone else getting/know how to get around this?
Title: Play Counter
Post by: beto on 2005-05-11 15:26:56
I get this error all the time, but apparently nothing is being lost/impacted so I just don't pay attention.
Title: Play Counter
Post by: krazy on 2005-05-11 16:20:15
It seems to stop foobar shutting down properly / updating the database.
I notice that foobar doesn't resume properly, and the playcount / last_played is not updated when re-opening foobar. I even had a corrupted .cfg the other day, but not sure if that can be attributed to playcount... 
Title: Play Counter
Post by: 4nt1 on 2005-05-12 23:59:22
i also get this error
acept i dont use the sqlite version of the component

i wish i knew what it was i am having real problems with foobar atm

might have to do a clean install of it
Title: Play Counter
Post by: kl33per on 2005-05-14 05:05:56
I've built a new version of foo_playcounter (the original one, not kode54's SQL version).  This version uses the LAST_PLAYED standard by default.  It won't change your settings though, so if you're still using PLAY_DATE and PLAY_TIME it will remain that way.  All new users should download this version.

foo_playcount 1.5.1 (Source & Binary Included) (http://users.tpg.com.au/adsll926/foobar/foo_playcount.rar)

If you have any feature requests, I'm willing to (attempt) to implement them.
Title: Play Counter
Post by: kl33per on 2005-05-14 06:18:23
foo_playcount 1.5.2 (Source & Binary Included) (http://users.tpg.com.au/adsll926/foobar/foo_playcount.rar)

Adds support for the FIRST_PLAYED tag.
Title: Play Counter
Post by: gob on 2005-05-14 06:26:11
Quote
foo_playcount 1.5.2 (Source & Binary Included) (http://users.tpg.com.au/adsll926/foobar/foo_playcount.rar)

Adds support for the FIRST_PLAYED tag.
[a href="index.php?act=findpost&pid=297383"][{POST_SNAPBACK}][/a]



wow. i like the sound of this new tag 

i wish there was a way to output these tags to an external database that is based on the files CRC. you would never loose tags for files that are renamed and/or moved.

this would also recuce the wear and tear due to defragmenting on my music drive, and the files will never change.
Title: Play Counter
Post by: kl33per on 2005-05-14 06:28:24
The plugin has not been extensively bug tested, but should work as expected.  It will write a FIRST_PLAYED tag if one does not already exist (not if PLAY_COUNTER = 0).

In regards to the database idea.  kode54's version of this plugin already uses an external database.  As for using file CRC's, if you change the tags within a file (eg. correct a spelling mistake) then your CRC will be messed up and will no longer work.  Ultimately, I have no plans for implementing a external database.  If you want, you can use kode54's version (but that doesn't support FIRST_PLAYED).  Hopefully foobar2000 0.9 will support database only information, which will solve this ongoing debate.
Title: Play Counter
Post by: gob on 2005-05-14 06:35:21
i used to add a tag to all my files called the %db_entry% that was basically the same thing. i ended up removing it because i thought it was useless. now i have thought of many interesting ideas to use it. now i wish i had kept all those tags.
Title: Play Counter
Post by: kl33per on 2005-05-14 06:42:11
Assuming there are no bugs to be fixed in the current version, the next major revision (1.6) will hopefully feature a redesigned GUI, and will automatically switch people over from PLAY_DATE and PLAY_TIME to LAST_PLAYED.  Any other feature requests are welcome.
Title: Play Counter
Post by: gob on 2005-05-14 06:48:19
Quote
Any other feature requests are welcome.
[a href="index.php?act=findpost&pid=297389"][{POST_SNAPBACK}][/a]


ability to set first played to 05/14/2005
Title: Play Counter
Post by: kl33per on 2005-05-14 06:53:04
As in custom time stamps?

This might be added to 1.6, or I might remove the ability to do custom time stamps all together.  Be forwarned that using custom time stamps will make your settings incompatible with any public columns_ui FCS.

If you want your date to be displayed somewhere like that, you can use
Code: [Select]
$if(%first_played%,$substr(%first_played%,6,7)/$substr(%first_played%,9,10)/$substr(%first_played%,1,4),Never Played)


Edit: Fixed stupid errors in my code, should work now.
Title: Play Counter
Post by: gob on 2005-05-14 06:58:43
no, you're right. now that i think about it, it would make everything much easier if there is only one standard.
Title: Play Counter
Post by: kl33per on 2005-05-14 07:45:04
I have to go to work now for a while.  When I return (about 5 hours from time of posting), I will begin working on 1.6.  Depending on the complexities faced, it may be released in the next 24 hours, or it may take a few days.  As I said before, any feature requests or suggestions are seriously considered and welcome.
Title: Play Counter
Post by: TheDom on 2005-05-14 09:48:01
Is it possible to add a field to the status bar which shows the sum of the playcounts of all marked tracks?
Title: Play Counter
Post by: kl33per on 2005-05-14 12:32:03
I don't think so.  At least, I don't know how to do it.  I'll look into it.
Title: Play Counter
Post by: Andreasvb on 2005-05-14 13:11:30
Any option to disable the new tag?

I only use the play counter, which I love.

Should I stick with the old one?
Title: Play Counter
Post by: kl33per on 2005-05-14 13:37:02
I've already implemented an option to disable any/all the tags, which will be available in version 1.6 (hopefully to be released very shortly - within an hour or two).
Title: Play Counter
Post by: kl33per on 2005-05-14 14:26:08
foo_playcount 1.6 (Source & Binary Included) (http://users.tpg.com.au/adsll926/foobar/foo_playcount.rar)

Version 1.6 (May 14 2005)

1) UI update.

2) Removed ability to have custom timestamping formats.  Everybody now uses LAST_PLAYED and FIRST_PLAYED standards.  Eg. 2005-11-24 16:59:32.  You can use TAGZ to display the information in any order you wish.

3) Removed a lot of code that was no longer neccessary due to the removal of custom timestamping.

4) Cleaned up some code here and there.

5) Made it possible to not write any/all of the tags.
Title: Play Counter
Post by: Andreasvb on 2005-05-14 14:26:28
Thank you very much =)
Title: Play Counter
Post by: kl33per on 2005-05-14 14:34:13
Now that 1.6 is done, I'm open to suggestions for new features as I have no new plans for the next version (other then looking into the status bar option).
Title: Play Counter
Post by: kl33per on 2005-05-14 14:47:33
1.6.1 will be released shortly changing "LAST_PLAYED" and "FIRST_PLAYED" to "LAST PLAYED" and "FIRST PLAYED" as that is the accepted standard. See here (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Encouraged_Tag_Standards).
Title: Play Counter
Post by: kl33per on 2005-05-14 14:58:17
foo_playcount 1.6.1 (Source & Binary Included) (http://users.tpg.com.au/adsll926/foobar/foo_playcount.rar)

1) Minor UI Changes

2) Fixed stupid error.  Changed "LAST_PLAYED" and "FIRST_PLAYED" to "LAST PLAYED" and "FIRST PLAYED". This is the encouraged standard.  See the Encouraged tag standards here (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Encouraged_Tag_Standards).

Four releases in one day may seem a little excessive.  However, this should be the last release for a while (assuming there are no other bugs).
Title: Play Counter
Post by: dano on 2005-05-14 15:06:27
??
the standard is WITH underscores
http://www.hydrogenaudio.org/forums/index....showtopic=31530 (http://www.hydrogenaudio.org/forums/index.php?showtopic=31530)
Title: Play Counter
Post by: kl33per on 2005-05-14 15:09:40
Not according to the wiki.  I don't care, I now preclaim it to be without underscores, but spaces instead.  I argued that it shouldn't use underscores.  Obviously someone changed the wiki so that it didn't use underscores, which confuses the matter.  Because ALBUM ARTIST doesn't use underscores, and the wiki says so, I'm going to leave it as spaces.
Title: Play Counter
Post by: Andreasvb on 2005-05-14 15:10:56
I think so too, I always use _ in my tags :S
Much easier if all use that, less confusing.
Title: Play Counter
Post by: kl33per on 2005-05-14 15:12:35
Well I'm not releasing two versions, so until Lyx gets back from his weekend trip, nothing is going to change, spaces will remain.
Title: Play Counter
Post by: Frank Bicking on 2005-05-14 15:23:11
Whatever you do, please keep it consistent.

Either Album Artist, First Played, Last Played, and Play Counter
or Album_Artist, First_Played, Last_Played, and Play_Counter.

As you're probably not going to reach a consensus on this topic,
I would still advocate the ability to define your own field names.

Let people decide if they want to break standards, don't enforce them.
Title: Play Counter
Post by: kl33per on 2005-05-14 15:28:17
I was about to change PLAY_COUNTER to PLAY COUNTER.

If people want to define there own field names, they can take the source and change it.  For the sake of simplicity, my version is going enforce standards.
Title: Play Counter
Post by: kl33per on 2005-05-14 15:46:24
Welcome to consistency.

foo_playcount 1.6.2 (Source & Binary Included) (http://users.tpg.com.au/adsll926/foobar/foo_playcount.rar)

1)  Changed PLAY_COUNTER to PLAY COUNTER.  Will automatically transfer over all old PLAY_COUNTER statistics to the new PLAY COUNTER tag.
Title: Play Counter
Post by: kl33per on 2005-05-14 15:48:22
To enable Lyx's Navigator columns_ui FCS to use LAST PLAYED instead of LAST_PLAYED, overwrite the code in the last played column with the below:
Code: [Select]
// DO NOT change anything here !
// for configuration, see the "Globals"-tab !
// ============================================

// last played
$if(%last played%,
%_standard_color%
$ifgreater(%_days_since_play%,30,$left(%last played%,10),
$ifgreater(%_days_since_play%,1,%_days_since_play%days ago,
$ifgreater(%_days_since_play%,0,yesterday,
%_special_color%' - today - '
)))
$char(9)%_standard_color_low%$substr(%last played%,12,16)
)
Title: Play Counter
Post by: dano on 2005-05-14 15:48:25
we had a standard, now you want to enforce a new one, i don't think that's a good way
..for the sake of simplicity you could have kept things like they were before
why do you want to change things?
the wiki was change by Canar on 8th may, i don't know why he did that
Title: Play Counter
Post by: kl33per on 2005-05-14 15:50:34
I don't know why Canar changed it, but he did and I agree with him
Title: Play Counter
Post by: beto on 2005-05-14 15:52:21
Thank you for the new release.

Are you considering to release a version thet supports external SQLite databases?
Title: Play Counter
Post by: kl33per on 2005-05-14 16:00:22
kode54's version supports an external database, but obviously not the latest changes I have made.  I may consider adding support for an external database if it is not to hard (I will look at kode54's code).
Title: Play Counter
Post by: kl33per on 2005-05-14 16:39:10
I've written a masstagger script to convert PLAY_COUNTER/FIRST_PLAYED/LAST_PLAYED to there equivalents without underscores.  Get it here (http://users.tpg.com.au/adsll926/foobar/Masstagger.mts).
Title: Play Counter
Post by: kockroach on 2005-05-14 16:42:14
I wish you would not have added in the "DB Only Mask" option set to mp3 only.  This wrote all of my play counter information to my FLAC files.

I didn't want to write anything to my files.  Had I known I would have removed my database first.

You might want to change this....or put up a warning, because I know there are others would probably do not want to write this data to their files.

Edit:  I just noticed that it is the same default as in v1.5.  Is it possible to add in the option to set all files as a default, and then you can change after install?
Title: Play Counter
Post by: kl33per on 2005-05-14 16:44:26
It shouldn't be, I must've changed something accidentally.  I will investigate.  By default its set *.wav only, and nothing to do with mp3.

Edit: Just saw your edit. It's possible, but the idea is that most people prefer it written to the file.  If there is a general consensus by a large majority that it should be set to all formats by default, I'm open to it.
Title: Play Counter
Post by: kockroach on 2005-05-14 16:48:39
You replied just as I made an edit to my post.

It appears that the DB Only Mask is a default to .mp3 in v1.5 as well.  Perhaps a new feature would be to have the option to disable file writing to all file types (as a default).  Once installed, you can then select whether you want to write to your files.
Title: Play Counter
Post by: kl33per on 2005-05-14 16:51:32
It does not default to *.mp3.  It defaults to *.wav. 

*.mp3 is a setting that is carrying over from your previous foo_playcount settings.

Like i said in my edit above, it's possible, but the idea is that most people prefer it written to the file. If there is a general consensus by a large majority that it should be set to all formats by default, I'm open to it.
Title: Play Counter
Post by: kockroach on 2005-05-14 16:55:53
I would think that a default to not write to the file would probably be best.  This would accommodate those that do not want to change their files, and can easily be turned on after install.  Having the write option turned off will not remove any play count information held in the file already, so it won't affect those that like to write to their files.

Just a thought.

Edit:  I also had re-installed my copy of v1.5, it wasn't the one I had been using.  The default for that .dll was .mp3.  I know that it was the original because the day and month orders were not the same as the ones I had been using.  Oh well....no big deal.
Title: Play Counter
Post by: kl33per on 2005-05-14 16:59:59
Also note that it only defers the writing of tag information to the file, it does not prevent it.  I cannot stop foobar from writting any information to the file at some point.  If the tags are ever updated (i.e. spelling correction), the foo_playcount information will also be written to the file.

Edit: I have the source code for 1.5 and the default is definately *.wav.

If you change pack to 1.5 after using my version, your timestamp settings will be reset to the 1.5 default settings (i.e. PLAY_DATE and PLAY_TIME.)
Title: Play Counter
Post by: kockroach on 2005-05-14 17:05:49
I didn't realize that.  Guess I could always activate the "Block tag update operations" in the Database section.  That way the files won't be changed.
Title: Play Counter
Post by: kockroach on 2005-05-14 17:23:19
kl33per, I just noticed that the version of foo_playcount I have is 1.6.1, but I downloaded it from your link to 1.6.2.  It also still has PLAY_COUNTER instead of PLAY COUNTER.

Thanks!
Title: Play Counter
Post by: kl33per on 2005-05-14 17:31:01
Forgot to forward the version number, hold on.

Edit: Download it now (http://users.tpg.com.au/adsll926/foobar/foo_playcount.rar).
Title: Play Counter
Post by: kockroach on 2005-05-14 17:38:33
Got it, thanks.  I checked it and the version number is 1.6.2, but under the Tag Writing section, it still has PLAY_COUNTER.  I haven't tried out my new script yet, so I don't know if it is just the window text, or if the parameter is still unchanged.  Thought you might like to know.
Title: Play Counter
Post by: kl33per on 2005-05-14 17:41:32
That's just window text, when it writes it, it writes PLAY COUNTER.  I will do another silent update.  You don't have to download unless the text on the preferences page is giving you nightmares

Edit: Update done.
Title: Play Counter
Post by: kockroach on 2005-05-14 17:50:18
That's cool.  Thanks for the update.  It looks good!
Title: Play Counter
Post by: kl33per on 2005-05-14 17:57:34
I'm glad someone appreciates it all.
Title: Play Counter
Post by: Chaser on 2005-05-14 18:43:15
kl33per, I think you do a great job here! Can't understand, why some people are not grateful for your time you spend in the further development of this plugin!
Title: Play Counter
Post by: kl33per on 2005-05-14 18:44:11
I'm sure they're all greatuful on the inside, thanks Chaser.
Title: Play Counter
Post by: gob on 2005-05-14 19:03:18
why have the tags changed again? can i get my underscores back?
Title: Play Counter
Post by: kl33per on 2005-05-14 19:11:39
Short answer, nope.

Long anwser.

Basically a few of us have decided that all tags should not have underscores (eg. ALBUM ARTIST, the most common two word tag does not have an underscore).  It is quite easy to update your config.

LAST_PLAYED = LAST PLAYED
FIRST_PLAYED = FIRST PLAYED
PLAY_COUNTER = PLAY COUNTER
Title: Play Counter
Post by: gob on 2005-05-14 19:16:33
i really like the new version, but i think im going back to the old version. too much confusion with all the tags. these are only tags ive seen with spaces in them with the exception with %album artist% it just creates gapps in the strings which makes me always look twice at the tags cause it looks akward.
Title: Play Counter
Post by: kl33per on 2005-05-14 19:19:34
That's your prerogative.  However, all public columns_ui configs will use spaces eventually, so by using the old version you are locking yourself out.
Title: Play Counter
Post by: gob on 2005-05-14 19:54:31
bahh u win %play counter% it is.. time to bust out the masstagger again 
Title: Play Counter
Post by: kl33per on 2005-05-14 19:58:32
I posted a masstagger script a few posts up.

Edit: Direct link to script (http://users.tpg.com.au/adsll926/foobar/Masstagger.mts)
Title: Play Counter
Post by: falconfox on 2005-05-14 20:38:08
someone has got to make their mind up on underscores or not. this is getting rediculous.
Title: Play Counter
Post by: Andreasvb on 2005-05-14 20:43:45
Yes, very confusing, I'll stick with the underscores version.
Title: Play Counter
Post by: Silverbolt on 2005-05-14 22:37:49
Quote
Short answer, nope.

Long anwser.

Basically a few of us have decided that all tags should not have underscores (eg. ALBUM ARTIST, the most common two word tag does not have an underscore).  It is quite easy to update your config.

LAST_PLAYED = LAST PLAYED
FIRST_PLAYED = FIRST PLAYED
PLAY_COUNTER = PLAY COUNTER[a href="index.php?act=findpost&pid=297556"][{POST_SNAPBACK}][/a]

Thanks for picking up development. Now I'm wondering, are there any decided 'standards' which DO have an underscore? If not, then I may as well remove underscores from all my fields (I've got maybe 25). Just want to know before I masstag 3 computers (may as well nuke the foobar configs to reset the tag dropdowns too).
Title: Play Counter
Post by: langoustator on 2005-05-14 22:45:36
I did modify the original foo_playcount so I could use "day of the week" in my formatting strings. I understand the need for standards, but I cannot use the new version because of that. After having read the wiki, i noticed that info can be appended after the standard string, so would it be possible to add it to the plugin?
Title: Play Counter
Post by: anza on 2005-05-14 23:42:42
Now that we're removing underscores from tag names (a good thing imho), we should perhaps ask if Peter would convert all the techical info field names to follow the "new standard".
Title: Play Counter
Post by: ExUser on 2005-05-15 00:29:57
Quote
Now that we're removing underscores from tag names (a good thing imho), we should perhaps ask if Peter would convert all the techical info field names to follow the "new standard".
[a href="index.php?act=findpost&pid=297621"][{POST_SNAPBACK}][/a]


Uninteresting, and he'd likely agree. Tech fields are tech fields. They're supposed to be different. That difference will be beneficial in the long run.
Title: Play Counter
Post by: ExUser on 2005-05-15 00:31:42
Quote
Thanks for picking up development. Now I'm wondering, are there any decided 'standards' which DO have an underscore? If not, then I may as well remove underscores from all my fields (I've got maybe 25). Just want to know before I masstag 3 computers (may as well nuke the foobar configs to reset the tag dropdowns too).
[a href="index.php?act=findpost&pid=297609"][{POST_SNAPBACK}][/a]


As far as I know, there are no other tags which use underscores. Feel free to masstag.
Title: Play Counter
Post by: Sam Stoat on 2005-05-15 01:38:10
While using foo_dsp_continuator with very short tracks (<20 secs), it lines up the next track before the percentage play count needs to update is played, meaning they are never classed as being played.  I don't want to set the percentage for all tracks to nothing, so how about an option to update these short tracks (user definable length?) as soon as they're played?
Title: Play Counter
Post by: kl33per on 2005-05-15 04:06:39
Quote
someone has got to make their mind up on underscores or not. this is getting rediculous.
[a href="index.php?act=findpost&pid=297587"][{POST_SNAPBACK}][/a]

Like I said, I have.  The verdict, no underscores.

Quote
I did modify the original foo_playcount so I could use "day of the week" in my formatting strings. I understand the need for standards, but I cannot use the new version because of that. After having read the wiki, i noticed that info can be appended after the standard string, so would it be possible to add it to the plugin?

I have this planned for 1.7.  How would you suggest it be done.  I take it you want foo_playcount to calculate the day of the week.

Quote
While using foo_dsp_continuator with very short tracks (<20 secs), it lines up the next track before the percentage play count needs to update is played, meaning they are never classed as being played.  I don't want to set the percentage for all tracks to nothing, so how about an option to update these short tracks (user definable length?) as soon as they're played?
[a href="index.php?act=findpost&pid=297631"][{POST_SNAPBACK}][/a]

I'll look into it, but that's getting overly complex.
Title: Play Counter
Post by: kl33per on 2005-05-15 08:36:27
Alright an update...

I have almost finished 1.7.

I've added the ability to write custom information after the standardised timestamping. (eg. 2005-06-07 08:02:03 CUSTOM INFO GOES HERE).  At the moment, this can be any date information used in the previous versions ($D,%Y,etc.), it can be the new %W which adds a single digit integer (0-6) representing the day of the week (starting at sunday for 0), and plaintext.  I'm also going to try and add the TAGZ to it, so you can include other tagging info (eg. %album%) if you wanted to (although I'm not sure why you would).

I've also half implemented Sam's suggestion, and will have it finished before the next release (hopefully later today).
Title: Play Counter
Post by: topdownjimmy on 2005-05-15 10:45:47
I have two reactions.

Thank you thank you thank you for FINALLY implementing FIRST(_)PLAYED.  I'd been waiting so long for that, and am looking forward to more long-overdue adjustments to play_counter in the near future.

But CRIPES is this standardization thing frustrating.  There was a solid week's worth of conversation invested in establishing the underscores as the standard, and now we're all being forced to change because of one person.

Something very important that I must also mention: in the wiki there are masstagger scripts used to convert different play_counter formats to the now-defunct underscore standard.  I've seen a few new scripts posted on this thread, so will those authors please upload them to the wiki in place of the outdated ones?

I'm not upset so much about whether there are spaces or underscores, but about having to worry about details like this when some well-established standard is capriciously changed by a frantic night of coding.  That strikes me as stubborn and inconsiderate. 

Please spare me the "SUIT YOURSELF AND STICK TO THE OBSOLETE STANDARD AND SEE IF I CARE" retort.
Title: Play Counter
Post by: anza on 2005-05-15 11:06:33
Quote
Quote
Now that we're removing underscores from tag names (a good thing imho), we should perhaps ask if Peter would convert all the techical info field names to follow the "new standard".
[a href="index.php?act=findpost&pid=297621"][{POST_SNAPBACK}][/a]


Uninteresting, and he'd likely agree. Tech fields are tech fields. They're supposed to be different. That difference will be beneficial in the long run.
[a href="index.php?act=findpost&pid=297626"][{POST_SNAPBACK}][/a]

I was actually being a bit sarcastic (which, unfortunately, isn't always so easy to note when communicating via the Internet). It was just an idea spawned by all this talk about consistency. IMHO it isn't consistent to have spaces in metadata fields but not in tech fields, but I do see some reason in having it that way and I support the current way.

One thing for kl33per: If you add the ability to use a SQL database in your version of the plugin, I hope you then allow to use underscores in the field names, as they're treated as tech fields. If you don't do that (or don't even make a SQL version), a number of us will stick with the old versions (which seems to be considered stupid).
Title: Play Counter
Post by: kl33per on 2005-05-15 11:15:29
If I make an SQL version, it will use underscores, as they are considered tech fields as you stated.
Title: Play Counter
Post by: Birk on 2005-05-15 11:22:35
Can you add the ability to add own tags, like with quicktag but which are updated like %last played%?
That would be very great, because everybody would use your standard and could use his own, too.
And TAGZ would be the best, because then i could have a history in every track or tings like intelligent rating ... 
(or let new untagged tracks automaticly get a tracknumber from playlist_number)
Yes, it would be very, very great !

and i think we should use the weekday as standard after the date (yyyy-mm-dd hh:mm:ss w)
Title: Play Counter
Post by: kl33per on 2005-05-15 11:30:46
Quote
I have two reactions.

Thank you thank you thank you for FINALLY implementing FIRST(_)PLAYED.  I'd been waiting so long for that, and am looking forward to more long-overdue adjustments to play_counter in the near future.

But CRIPES is this standardization thing frustrating.  There was a solid week's worth of conversation invested in establishing the underscores as the standard, and now we're all being forced to change because of one person.

Something very important that I must also mention: in the wiki there are masstagger scripts used to convert different play_counter formats to the now-defunct underscore standard.  I've seen a few new scripts posted on this thread, so will those authors please upload them to the wiki in place of the outdated ones?

I'm not upset so much about whether there are spaces or underscores, but about having to worry about details like this when some well-established standard is capriciously changed by a frantic night of coding.  That strikes me as stubborn and inconsiderate. 

Please spare me the "SUIT YOURSELF AND STICK TO THE OBSOLETE STANDARD AND SEE IF I CARE" retort.
[a href="index.php?act=findpost&pid=297695"][{POST_SNAPBACK}][/a]


The only reason foo_playcount became standardised as using tags with spaces is because Canar changed the wiki to reflect this, and I read it from the wiki, and not the original post.  So either the wiki is correct, or the original forum post is correct.  Because ALBUM ARTIST doesn't have an underscore, and I'm an advocate of using spaces, I've made foo_playcounter use spaces.  I'm am sorry if this annoys anyone, but Canar changed the wiki, I changed the plugin, and I'm not really that interested in changing it back.  BTW, I would hardly call it a frantic night of coding.  There were just a lot of releases in a short time period.  At one point, foo_playlist_tree had a new build every day.

As to the masstagger scripts on the wiki, they have now been updated.
Title: Play Counter
Post by: kl33per on 2005-05-15 11:35:30
Quote
Can you add the ability to add own tags, like with quicktag but which are updated like %last played%?
That would be very great, because everybody would use your standard and could use his own, too.
And TAGZ would be the best, because then i could have a history in every track or tings like intelligent rating ...  
(or let new untagged tracks automaticly get a tracknumber from playlist_number)
Yes, it would be very, very great !

and i think we should use the weekday as standard after the date (yyyy-mm-dd hh:mm:ss w)
[a href="index.php?act=findpost&pid=297703"][{POST_SNAPBACK}][/a]

Note, the only tags that foo_playcount will now write are PLAY COUNTER, FIRST PLAYED, and LAST PLAYED.  It can not write other tags like TRACKNUMBER.  What your talking about is the job of another plugin.
Title: Play Counter
Post by: kl33per on 2005-05-15 11:58:35
foo_playcount 1.7.0 (Source & Binray Included) (http://users.tpg.com.au/adsll926/foobar/foo_playcount.rar)

Version 1.7.0 (May 15 2005)

1) Where to start... Another UI update to the preferences to incorporate the new features

2) Now able to append information to the end of both the FIRST PLAYED and LAST PLAYED tags.
You can use either plain text, or the Timestamp Format Specifiers listed under "Help"
on the preferences page.  There is a single space between the standardised timestamp
and any appended data.

3) Added new Timestamp Format Specifier %W.  This adds a single digit integer representing
the day ofthe week starting from Sunday (integers are 0-6).

4) Added ability to immediately update the tags on a particular song if it is under a
certain length.  Length is set to 0 by default, which is ignored.  Length is in seconds.
Title: Play Counter
Post by: Lance Uppercut on 2005-05-15 13:08:30
Quote
foo_playcount 1.7.0 (Source & Binray Included) (http://users.tpg.com.au/adsll926/foobar/foo_playcount.rar)

Version 1.7.0 (May 15 2005)

1) Where to start... Another UI update to the preferences to incorporate the new features

2) Now able to append information to the end of both the FIRST PLAYED and LAST PLAYED tags.
You can use either plain text, or the Timestamp Format Specifiers listed under "Help"
on the preferences page.  There is a single space between the standardised timestamp
and any appended data.

3) Added new Timestamp Format Specifier %W.  This adds a single digit integer representing
the day ofthe week starting from Sunday (integers are 0-6).

4) Added ability to immediately update the tags on a particular song if it is under a
certain length.  Length is set to 0 by default, which is ignored.  Length is in seconds.
[a href="index.php?act=findpost&pid=297710"][{POST_SNAPBACK}][/a]



I don't care what anyone says, underscore, spaces, who cares and too bad.  kl33per rocks hard for putting so much work into this plugin, which I believe is almost perfect (I would love database support, but tagging files is fine with me).

Thanks again
Title: Play Counter
Post by: kl33per on 2005-05-15 13:25:20
Thanks Lance
Title: Play Counter
Post by: Lance Uppercut on 2005-05-15 13:39:09
Could you make the day of the week start at 1.  The $select function for formating doesn't work with zero.

Thanks

-edit  I guess I could always use $add 1
Title: Play Counter
Post by: kl33per on 2005-05-15 13:52:37
I can do that. In the next update.

Edit:
foo_playcount 1.7.1 (Source & Binary Included) (http://users.tpg.com.au/adsll926/foobar/foo_playcount.rar)

Version 1.7.1 (May 15 2005)

1) Changed the %W specifier to now use 1-7 starting at Sunday, due to foobar's $select function not working with 0.
Title: Play Counter
Post by: langoustator on 2005-05-15 14:09:23
Quote
2) Now able to append information to the end of both the FIRST PLAYED and LAST PLAYED tags.
You can use either plain text, or the Timestamp Format Specifiers listed under "Help"
on the preferences page.  There is a single space between the standardised timestamp
and any appended data.

3) Added new Timestamp Format Specifier %W.  This adds a single digit integer representing
the day ofthe week starting from Sunday (integers are 0-6).


Thank you
Title: Play Counter
Post by: ExUser on 2005-05-15 15:16:04
Quote
But CRIPES is this standardization thing frustrating.  There was a solid week's worth of conversation invested in establishing the underscores as the standard, and now we're all being forced to change because of one person.

Something very important that I must also mention: in the wiki there are masstagger scripts used to convert different play_counter formats to the now-defunct underscore standard.  I've seen a few new scripts posted on this thread, so will those authors please upload them to the wiki in place of the outdated ones?

I'm not upset so much about whether there are spaces or underscores, but about having to worry about details like this when some well-established standard is capriciously changed by a frantic night of coding.  That strikes me as stubborn and inconsiderate.[a href="index.php?act=findpost&pid=297695"][{POST_SNAPBACK}][/a]


First of all, this "standard" was hardly well-established in the first place.

Second of all, switching formats is difficult as making one pass using the masstagger, so any complaints about how much work it causes are completely baseless.

Third, the new format is logically superior, which is generally one of the guiding principles of foobar2000. If we're going to be revisionistic with our philosophies (as is the foobar2000 standard), it is better to change things as soon as they come up.

I'm aware that people spent a lot of time discussing the LAST_PLAYED thing, but I had yet to get a single comment that logically explained why underscores were preferable to spaces. That is why I acted. We might as well get this stuff sorted out before 0.9 hits.

It's really, really, really, really irrelevant anyways. It's just another field that can easily be modified using the masstagger. Stop making a mountain out of a mole hill and shut up unless you're helping solve an extant problem.
Title: Play Counter
Post by: kl33per on 2005-05-15 15:34:33
foo_playcount 1.7.2 (Source & Binary Included) (http://users.tpg.com.au/adsll926/foobar/foo_playcount.rar)

Version 1.7.2 (May 15 2005)

1) By popular demand, I have added the option to write the NON-STANDARD tags PLAY_COUNTER, LAST_PLAYED, and FIRST_PLAYED.  These tags are NON-STANDARD and WILL be removed from future versions once the " " versions of the tags become more common.  Use these tags at your own risk. New users should use the default settings.

As a side note, I am very annoyed that I've had to release this version.  It is honestly not that hard to change to " " versions of the tags.  I will not keep these options in foo_playcount forever and it WILL be removed in the future.

Edit 1: I built this version and wrote this post before I saw Canar's post above.  For the record, I completely agree with him.  This build is only for you royal pains that require your tags to have underscores.

Edit 2: And for the record, custom field names will not return.  You have spaces, or  underscores, and only until the next version, where I will remove the underscores option.

Edit 3: Effectively immediately there is also no support from me for this version.  There will be no bug fixes for this version of the plugin.  It is a one off release.  The next build will be based off of the previous 1.7.1 build.
Title: Play Counter
Post by: kl33per on 2005-05-15 15:54:47
Meanwhile, I'd like some feature requests for the next major revision.  Just throw them my way.

Current Feature Requests
---------------------------------
1) Add status bar section that totals PLAY COUNTER for all selected files
2) Add external database support

I'm not even sure if adding feature 1 is possible, but I will look into it (does anybody know any plugin that adds a field to the statusbar?).  I looked at kode54's external database version, but I can't even get it to build let alone understand the code inside.  Until foobar natively supports database only info, my version of the plugin will write tags to the file.

@ kode54, you're quite welcome to take my source and build an updated version of your component.

Edit 1: Unless I'm missing something obvious, number 1 is not possible.  If someone knows how to do this, let me know.
Title: Play Counter
Post by: kjoonlee on 2005-05-15 16:01:46
Since custom fields are not returning, some users will be locked out of using the new weekday function.
Title: Play Counter
Post by: kl33per on 2005-05-15 16:03:07
Why?  You can still append data to the standardised tags.  You just can't pick any name you want for them.  The names are set in stone as of the very next version.
Title: Play Counter
Post by: kjoonlee on 2005-05-15 16:09:37
People who want custom field names will have to use a version of %W that doesn't work cleanly with $select().
Title: Play Counter
Post by: mixcherry on 2005-05-15 16:11:34
It seems that version 1.7.2 (I don't know about earlier versions) doesn't transfer my old data (PLAY_COUNTER) to new format (PLAY COUNTER). It deletes the old data and writes the new tag (PLAY COUNTER) with value set to 1.

I don't know if there is any connection, but I have 'Block tag update operations' turned ON (under Database settings). And 'DB Only Mask' set to '*.*'
Title: Play Counter
Post by: kl33per on 2005-05-15 16:11:47
You're not making any sense?

No verision that has support for %W has been released with custom field name support.  It has never existed.
Title: Play Counter
Post by: kjoonlee on 2005-05-15 16:13:30
In which case, it's even worse. People like me who want custom field names can't even use %W.
Title: Play Counter
Post by: kl33per on 2005-05-15 16:13:48
Quote
It seems that version 1.7.2 (I don't know about earlier versions) doesn't transfer my old data (PLAY_COUNTER) to new format (PLAY COUNTER). It deletes the old data and writes the new tag (PLAY COUNTER) with value set to 1.

I don't know if there is any connection, but I have 'Block tag update operations' turned ON (under Database settings). And 'DB Only Mask' set to '*.*'
[a href="index.php?act=findpost&pid=297761"][{POST_SNAPBACK}][/a]

Sorry, that's by design.  I had to do that to add on the option to write the old PLAY_COUNTER as well.  If you want to convert all the songs in your playlist to the new PLAY COUNTER format (and LAST PLAYED/FIRST PLAYED as well), use the Masstagger script included in the RAR archive.
Title: Play Counter
Post by: kl33per on 2005-05-15 16:14:45
Quote
In which case, it's even worse. People like me who want custom field names can't even use %W.
[a href="index.php?act=findpost&pid=297763"][{POST_SNAPBACK}][/a]

That's correct.  Tough luck I'm afraid.

Either use the new tags, or don't use %W.
Title: Play Counter
Post by: mixcherry on 2005-05-15 16:34:11
Quote
Quote
It seems that version 1.7.2 (I don't know about earlier versions) doesn't transfer my old data (PLAY_COUNTER) to new format (PLAY COUNTER). It deletes the old data and writes the new tag (PLAY COUNTER) with value set to 1.

I don't know if there is any connection, but I have 'Block tag update operations' turned ON (under Database settings). And 'DB Only Mask' set to '*.*'
[a href="index.php?act=findpost&pid=297761"][{POST_SNAPBACK}][/a]

Sorry, that's by design.  I had to do that to add on the option to write the old PLAY_COUNTER as well.  If you want to convert all the songs in your playlist to the new PLAY COUNTER format (and LAST PLAYED/FIRST PLAYED as well), use the Masstagger script included in the RAR archive.
[a href="index.php?act=findpost&pid=297764"][{POST_SNAPBACK}][/a]

Ok, I understand that  There is (very small) bug in Masstagger script - it deletes existing PLAY COUNTER tags (only if there is no PLAY_COUNTER). I think you should change Actions from:
Code: [Select]
Copy 'PLAY_COUNTER' to 'PLAY COUNTER'

to:
Code: [Select]
Format "PLAY COUNTER" using "$if3(%play_counter%,%play counter%)"

I think that solves the problem.
Title: Play Counter
Post by: kl33per on 2005-05-15 16:36:31
That's a huge problem, will fix immediately.  Thanks.

Edit 1: Fixed, also applied to the other two fields.  Thanks for pointing that out.

Edit 2: Fix doesn't work properly.  I suggest everyone avoides using the script until I fix it.

Edit 3:  I think it's impossible to fix.  I have restored the original version of the script. Ideally, you need to run the script before using the new tags.

Edit 4: My brain needs a holiday, argh...
Title: Play Counter
Post by: kl33per on 2005-05-15 18:12:42
foo_playcount 1.7.3 (Source & Binary Included) (http://users.tpg.com.au/adsll926/foobar/foo_playcount.rar)

Version 1.7.3 (May 15 2005)

1) After much outcry from various parties, it has been decided by the majority that we will use PLAY_COUNTER, FIRST_PLAYED and LAST_PLAYED (i.e. tags with underscores).  I apologize to anyone I've inconvenienced in the few short days my version of the plugin has been available.  I promise this is the last tag change for the forseeable future.  All PLAY COUNTER tags automatically get carried over to PLAY_COUNTER tags.
Title: Play Counter
Post by: topdownjimmy on 2005-05-15 18:25:18
Quote
foo_playcount 1.7.3 (Source & Binary Included) (http://users.tpg.com.au/adsll926/foobar/foo_playcount.rar)

Version 1.7.3 (May 15 2005)

1) After much outcry from various parties, it has been decided by the majority that we will use PLAY_COUNTER, FIRST_PLAYED and LAST_PLAYED (i.e. tags with underscores).  I apologize to anyone I've inconvienced in the few short days my version of the plugin has been available.  I promise this is the last tag change for the forseeable future.  All PLAY COUNTER tags automatically get carried over to PLAY_COUNTER tags.
[a href="index.php?act=findpost&pid=297807"][{POST_SNAPBACK}][/a]

Thank you.

It's not that we were ungrateful, but I think we should take standards seriously, even if we do suffer a sprained wrist or two from reaching over to the underscore key.

Welp, time to go re-masstag my files and make sure the wiki is consistent!  Canar was right, changing standards on a whim is effortless!
Title: Play Counter
Post by: jkwarras on 2005-05-15 18:25:33
First of all Thanks to kl33per fort his plugin

I'll second the request of the sql version, but as I see you have some problems into getting it done, I know that fermion did use the sql version of kode54 foo_playcount to make a foo_quicktag sql version, maybe he can help you with this. Links are:

- homepage component: http://users.tkk.fi/~tahlberg/foo/ (http://users.tkk.fi/~tahlberg/foo/)
- forum discussion: http://www.hydrogenaudio.org/forums/index....opic=31803&st=0 (http://www.hydrogenaudio.org/forums/index.php?showtopic=31803&st=0)
Title: Play Counter
Post by: Frank Bicking on 2005-05-15 18:27:52
Quote
it has been decided by the majority

Which majority? 
Title: Play Counter
Post by: kl33per on 2005-05-15 18:29:48
What I really need to do is talk to kode54.  Hopefully he can give me some advice.

If you read this thread kode54, are you interested in taking my version and adding database support.  If not, I would be willing to try, but alas I cannot build your version.  It seems to be dependency hell .  What libraries do i need, where do I get them, and where do I put them?
Title: Play Counter
Post by: kl33per on 2005-05-15 18:30:51
Quote
Quote
it has been decided by the majority

Which majority? 
[a href="index.php?act=findpost&pid=297815"][{POST_SNAPBACK}][/a]

Not really a mojority so much as it had already been decided that underscores were to be used and Canar and I wen't off on a wild tagent.
Title: Play Counter
Post by: Lyx on 2005-05-15 18:30:58
kl33per:
Thanks for your implementation. To not cause you any hassle, may i ask if there are any traffic concerns with the webspace where you uploaded your build? I'm asking because i would like to put a direct-link to your build in the HOW-TO of the next release of my formatting(yes, i do plan to implement full playback-stats like plays/day).

- Lyx
Title: Play Counter
Post by: kl33per on 2005-05-15 18:34:50
I will check if there is some kind of limit.  It's my home ISP's free webspace, but it's stable so I will read the TOS.

Edit: There shouldn't be any problem, feel free to direct link it.
Title: Play Counter
Post by: Lyx on 2005-05-15 18:36:37
Quote
I will check if there is some kind of limit.  It's my home ISP's free webspace, but it's stable so I will read the TOS.
[a href="index.php?act=findpost&pid=297821"][{POST_SNAPBACK}][/a]


To give you an estimation: asume up to 500 downloads per month if i put a direct link in the how-to (but it will probably be less. Its a "worst-case"-guess)
Title: Play Counter
Post by: kl33per on 2005-05-15 18:40:07
Quote
Quote
I will check if there is some kind of limit.  It's my home ISP's free webspace, but it's stable so I will read the TOS.
[a href="index.php?act=findpost&pid=297821"][{POST_SNAPBACK}][/a]


To give you an estimation: asume up to 500 downloads per month if i put a direct link in the how-to (but it will probably be less. Its a "worst-case"-guess)
[a href="index.php?act=findpost&pid=297822"][{POST_SNAPBACK}][/a]

That's only 15mb of traffic a month.  I assume this will probably be fine.  If it's not, they'll just send me an email, and I'll find somewhere else to host it.  I don't forsee it being a problem.

Edit: @ below, thanks .
Title: Play Counter
Post by: Lyx on 2005-05-15 18:45:00
BTW: very clean and "sectionized" prefs UI. Nice job.
Title: Play Counter
Post by: kl33per on 2005-05-15 18:47:48
Alright, I'm looking into a new feature that would store the user name of the person who last played that song.  It would have to be in a seperate tag.  I propose it be LAST_PLAYED_BY.

Is this a feature people would be interested in?
Title: Play Counter
Post by: topdownjimmy on 2005-05-15 18:52:09
I've always thought it would be convenient to have the option of adding a PLAY_STAMP field which has multiple values, one for every time the track is played.  This way the whole history of a track can be seen.
Title: Play Counter
Post by: kl33per on 2005-05-15 18:54:50
That would create tagging hell thought.  Can you imagine 1000 PLAY_STAMP fields.
Title: Play Counter
Post by: topdownjimmy on 2005-05-15 19:06:52
Quote
That would create tagging hell thought.  Can you imagine 1000 PLAY_STAMP fields.
[a href="index.php?act=findpost&pid=297835"][{POST_SNAPBACK}][/a]

Of course it would be optional, and my library is so big that since I started using play_count at the beginning of this year, very few of my songs are at over 10 plays.  But you're right, that might become problematic in the future.  I thought it would be interesting to generate playlists like "what I was listening to on the week of February 12-19."
Title: Play Counter
Post by: kl33per on 2005-05-15 19:16:00
It is interesting, and I may consider implementing it.

Anyone for the last played by username idea?
Title: Play Counter
Post by: topdownjimmy on 2005-05-15 19:30:50
Quote
Anyone for the last played by username idea?
[a href="index.php?act=findpost&pid=297843"][{POST_SNAPBACK}][/a]

Why not add %U, which will append the username to the end of LAST_PLAYED?
Code: [Select]
$right(%last_played%,21,$len(%last_played%))
Title: Play Counter
Post by: kl33per on 2005-05-15 19:32:38
Problem with that is, how do you access it.  Usernames have varying lengths, therefore it becomes impossible to format it through TAGZ.
Title: Play Counter
Post by: topdownjimmy on 2005-05-15 19:54:11
Quote
Problem with that is, how do you access it.  Usernames have varying lengths, therefore it becomes impossible to format it through TAGZ.
[a href="index.php?act=findpost&pid=297853"][{POST_SNAPBACK}][/a]

That why I included that code...if you always place it at the end of the last_played field, you just access it by taking everything to the right of your fixed-length date/timestamp data.

But I think you're right...I don't like tag field proliferation, but this data is of a different type than date/timestamp, and even if consistency is maintained by each user with himself, it would be nice if .fcs developers could account for this data as well.

I mean hey, if it's just optional, why not throw it on there?  I'm sure someone will find a use for it.  LAST_PLAYED_BY is a very logical name, too.
Title: Play Counter
Post by: kl33per on 2005-05-15 20:01:13
The $right() function is horrible on performance.  Apart from that, what if I wanted to add other variable length options in between.

Eg. 2005-06-11 08:02:04 Sunday ATHLON3500 kl33per
Here you have regular timestamp, the day, name of the machine on the network, and the username, but you can't format it with TAGZ.
Title: Play Counter
Post by: Lyx on 2005-05-15 20:32:01
$substr(%last_played%,20,$len(%last_played%))

...will display all appended info after the date- and timestamp.

One coud split that by resource-hungry searching for spaces as seperators and then splicing the substring. But for sure not an optimal solution.

- Lyx
Title: Play Counter
Post by: kl33per on 2005-05-15 20:34:27
But if there are multiple pieces of information, all with varying lengths after the official timestamp, you can't format it.
Title: Play Counter
Post by: Silverbolt on 2005-05-15 22:17:55
Quote
foo_playcount 1.7.3 (Source & Binary Included) (http://users.tpg.com.au/adsll926/foobar/foo_playcount.rar)

Version 1.7.3 (May 15 2005)

1) After much outcry from various parties, it has been decided by the majority that we will use PLAY_COUNTER, FIRST_PLAYED and LAST_PLAYED (i.e. tags with underscores).  I apologize to anyone I've inconvenienced in the few short days my version of the plugin has been available.  I promise this is the last tag change for the forseeable future.  All PLAY COUNTER tags automatically get carried over to PLAY_COUNTER tags.
[{POST_SNAPBACK}][/a] (http://index.php?act=findpost&pid=297807")

Wow, so much has happened this morning. Reason I initially used underscores was because I was just following the established [a href="http://www.matroska.org/technical/specs/tagging/index.html]Matroska[/url] fields. Could've gone either way, but to be honest, kinda glad things ended the way they did (my brother just finished backing up all his music to DVDs a few days ago). Thanks, kl33per and hope you aren't getting too stressed :3
Title: Play Counter
Post by: kl33per on 2005-05-16 04:29:00
Stressed is my middle name .

Edit 1: Is there anyone actually interested in having a LAST_PLAYED_BY field.  If you missed it above, it stores the user name of the last person who played a particular song.  Only useful to those people who have multiple users on one computer, or who have there music collection available on a network.

Edit 2: Tag will only work on Windows 2000 and above.  I'm not sure what will happen on Win9x machines.
Title: Play Counter
Post by: Silverbolt on 2005-05-16 04:56:34
Quote
Stressed is my middle name :).

Edit 1: Is there anyone actually interested in having a LAST_PLAYED_BY field.  If you missed it above, it stores the user name of the last person who played a particular song.  Only useful to those people who have multiple users on one computer, or who have there music collection available on a network.

Edit 2: Tag will only work on Windows 2000 and above.  I'm not sure what will happen on Win9x machines.[a href="index.php?act=findpost&pid=297956"][{POST_SNAPBACK}][/a]

That'd be cool (my music's on a network). Probably would use it if you implemented it, but no biggie if you didn't.
Title: Play Counter
Post by: kl33per on 2005-05-16 05:10:54
Well atm, it looks like the next version will support both a LAST_PLAYED_BY field and a PLAY STAMP field, as per topdownjimmy's suggestion above.  LAST_PLAYED_BY is turned on by default (easy to turn off) and PLAY STAMP is turned off by default.

Edit 1:  PLAY STAMP format is "2005-01-01 00:00:00 User Name"
Title: Play Counter
Post by: kl33per on 2005-05-16 05:27:34
Quote
One coud split that by resource-hungry searching for spaces as seperators and then splicing the substring. But for sure not an optimal solution.[a href="index.php?act=findpost&pid=297881"][{POST_SNAPBACK}][/a]

What if the information contained spaces (eg. "User Name").
Title: Play Counter
Post by: kl33per on 2005-05-16 08:00:01
An Update

I have now built a new version of foo_playcount which supports a new tag PLAY STAMP, and which supports my proposed amendments to the tags LAST_PLAYED and FIRST_PLAYED.  My proposals can be found here (http://www.hydrogenaudio.org/forums/index.php?showtopic=31530&view=findpost&p=297969).

This build will become available if/when my proposal becomes an encourage standard, so please head over to the thread linked above and have your say.
Title: Play Counter
Post by: Birk on 2005-05-16 12:36:02
can we use
"yyyy-mm-dd hh:mm:ss w /User Name"
because with the "/" we can use $filename(%LAST_PLAYED%) to display the user name
(it only would make a problem if "/", "\" or ":" would be in the user name, but ithink that isn't possible)

And do you really want make always a new %play stamp% field for each time?
(i think a new line would be better)
Title: Play Counter
Post by: kl33per on 2005-05-16 12:53:12
Quote
can we use
"yyyy-mm-dd hh:mm:ss w /User Name"
because with the "/" we can use $filename(%LAST_PLAYED%) to display the user name
(it only would make a problem if "/", "\" or ":" would be in the user name, but ithink that isn't possible)

And do you really want make always a new %play stamp% field for each time?
(i think a new line would be better)
[a href="index.php?act=findpost&pid=298031"][{POST_SNAPBACK}][/a]


That's kind of a hack.  I don't think the $filename function was really designed for that purpose.

As far as using a new %play stamp% field every time, that was the original suggestion.  How hard would it be to pass the kind of tag you describe, with a new line for each piece of information.
Title: Play Counter
Post by: kl33per on 2005-05-16 14:06:50
foo_playcount 1.7.6 (Source & Binary Included) (http://users.tpg.com.au/adsll926/foobar/foo_playcount.rar)

Version 1.7.6 (May 16 2005)

1) Added new specifier #U which writes the name of the user who started foobar2000.

2) Merged the appended information fields into one field.

3) Adds support for new PLAY_STAMP tag.  Requires LAST_PLAYED/FIRST_PLAYED writing to be enabled.  PLAY_STAMP is disabled by default.  The PLAY_STAMP tag gets copied from the LAST_PLAYED tag on update.  In other words, the old LAST_PLAYED tag gets transferred to a PLAY_STAMP tag.  The PLAY_STAMP tag can occur multiple times.

Edit 1: To be more clear, if you enable PLAY_STAMP, it will record all the times a song has been played between the time it was first played, and the time it was last played.

Eg.

FIRST_PLAYED = A
PLAY_STAMP = B
LAST_PLAYED= C

on next play:

FIRST_PLAYED = A
PLAY_STAMP = B
PLAY_STAMP = C
LAST_PLAYED= D

Edit 2: If anyone has any requests for the next version (I have no plans... yet), please just post.
Title: Play Counter
Post by: kockroach on 2005-05-16 20:23:25
Hey kl33per,

I like the changes that you've made.  I'm glad to see that %W and #U are optional, as I would not use the #U but might incorporate %W.  One question though....how much does each PLAY_STAMP tag add to the filesize? 

Again, great job...and sorry to see that there has been such a comotion over the space vs underscore issue.
Title: Play Counter
Post by: jkwarras on 2005-05-16 21:20:45
Quote
Edit 2: If anyone has any requests for the next version (I have no plans... yet), please just post.
[a href="index.php?act=findpost&pid=298045"][{POST_SNAPBACK}][/a]

If I could have all that features in a sqlite version (external database) that will be great  Great job dude.
Title: Play Counter
Post by: kockroach on 2005-05-16 22:26:05
That's why I asked about the size of the PLAY_STAMP tag.  I think a tag like that would be better if it wasn't written to the file, but to a database.  Hopefully something can get figured out.  If not, so be it.
Title: Play Counter
Post by: topdownjimmy on 2005-05-16 22:38:29
So, so, so, so awesome.  I've been waiting for an update to this plugin for so long.

Thank you!!
Title: Play Counter
Post by: topdownjimmy on 2005-05-16 22:54:06
Quote
One question though....how much does each PLAY_STAMP tag add to the filesize?[a href="index.php?act=findpost&pid=298123"][{POST_SNAPBACK}][/a]

20 PLAY_STAMP tags (including the appended %W) just cost me about 500 bytes (APEv2).

I'm gonna use it in case someone comes up with a brilliant implementation of this data.
Title: Play Counter
Post by: Zurman on 2005-05-16 22:58:23
Nice update !

I like the idea of play_stamp, but when a file is played many times, it becomes very hard to read the tags in the special file info box.
Would it be possible to just append the next stamp to the current stamp?

eg : PLAY_STAMP = a

I play the file :
PLAY_STAMP = a;b

I play it again :
PLAY_STAMP = a;b;c

etc.
Title: Play Counter
Post by: topdownjimmy on 2005-05-16 23:25:46
I also think it might be best to store the last played and first played stamps in PLAY_STAMP fields as well.  This way you only have to do a search on one field if you're looking for historical data.
Title: Play Counter
Post by: Silverbolt on 2005-05-16 23:27:03
Quote
Nice update !

I like the idea of play_stamp, but when a file is played many times, it becomes very hard to read the tags in the special file info box.
Would it be possible to just append the next stamp to the current stamp?[a href="index.php?act=findpost&pid=298167"][{POST_SNAPBACK}][/a]

That or someone could ask Nirana to update foo_infobox to display multiple fields as a single entry (like the multiple items properties box with the \ separators) or as a little +/- tree. Don't know if that'd be possible, but would be rather cool.

Edit: added 'multiple'
Title: Play Counter
Post by: gob on 2005-05-16 23:27:53
i really like the work you've done on this plugin. keep up the great work.
Title: Play Counter
Post by: topdownjimmy on 2005-05-16 23:34:09
Quote
Nice update !

I like the idea of play_stamp, but when a file is played many times, it becomes very hard to read the tags in the special file info box.
Would it be possible to just append the next stamp to the current stamp?

eg : PLAY_STAMP = a

I play the file :
PLAY_STAMP = a;b

I play it again :
PLAY_STAMP = a;b;c

etc.
[a href="index.php?act=findpost&pid=298167"][{POST_SNAPBACK}][/a]

A problem I can see with that is that then the user name issue becomes a problem again...if you want to include user names in your play stamps and they're all on one line, the data becomes impossible to parse.

...or maybe just more difficult, I haven't thought that through.  Someone more adept at tagz, help me out...

This has got me thinking about the application of this data as well.  Say it's Sunday morning and I can't think of anything to listen to...how might I create a playlist with the songs that are played most often on Sunday mornings?  Is that even possible?
Title: Play Counter
Post by: kl33per on 2005-05-17 01:08:53
Not impossible to parse, but definately more difficult.  Also becomes much slower to parse.  I will investigate the option of starting a new line for each stamp.

About the external database issue.  I may investigate adding MySQL/SQLite support due to the lack of other requested features.  It might not be for a little while though.  If I do, I will atempt to have it all contained in the one plugin with the ability to write tags to file, database, or both.
Title: Play Counter
Post by: kl33per on 2005-05-17 01:10:53
Quote
I also think it might be best to store the last played and first played stamps in PLAY_STAMP fields as well.  This way you only have to do a search on one field if you're looking for historical data.
[a href="index.php?act=findpost&pid=298171"][{POST_SNAPBACK}][/a]

I considered this, but then there is redundancy in the data.  I can make it so PLAY_STAMP is a field all unto it's own, but I liked the idea that it displayed a complete play history between the first and last times played.
Title: Play Counter
Post by: kl33per on 2005-05-17 01:15:33
Quote
This has got me thinking about the application of this data as well.  Say it's Sunday morning and I can't think of anything to listen to...how might I create a playlist with the songs that are played most often on Sunday mornings?  Is that even possible?
[a href="index.php?act=findpost&pid=298174"][{POST_SNAPBACK}][/a]

It should be possible (at least to get songs played on a Sunday), although it would be a complicated bit of TAGZ code.

Let me think on it.

Edit:
The code below will give seperate the day of the week.  I don't have access to foobar right now, so I don't feel confident in writing full TAGZ code.  However, it should be a start.
Code: [Select]
$substr(%PLAY_STAMP%,20,21)
Title: Play Counter
Post by: Lyx on 2005-05-17 01:15:49
Not really a feature-request, but a development-style proposal:

Since the plugin is right now a bit unstable (not in terms of bugs, but instead in terms of features) maybe it would make sense to call versions which are meant to test-drive new features "test-versions", and then from time to time do "stable" versions which contain only finalized features. That would solve the problem of you implementing a new feature - then people using it - but then you want to change it and have to deal with the users who are using the old-method.
Title: Play Counter
Post by: kl33per on 2005-05-17 01:19:14
Good idea Lyx.  Although I expect development rate to slow significantly now that I have almost everyone's feature requests done, I will probably still do this.  If I do, the stable version will always be at the normal address (http://users.tpg.com.au/adsll926/foobar/foo_playcount.rar).

In accordance with Lyx's suggestion, foo_playcount 1.7.6 is a test version designed to test the PLAY_STAMP tag.  All other features are finalised.  In other words, until PLAY_STAMP is finalised, it's format may change.
Title: Play Counter
Post by: Lyx on 2005-05-17 01:40:24
Some stuff about hosting and filenames which i wanted to mention anyways:
Currently, your new playcount plugin file is directly linked in the tag-standards-thread - additionally it will probably get linked in the navigator docs.
So, it would be of advantage if the URL doesn't change. In that case, it may also make sense to name test-versions differently than stable versions(so that the people who DL it via the direct-links only get stable versions).

Something which would of course be much more elegant (and give the plugin more publicity) would be the following:
Once you're satisfied with your plugin, you could do a stable version, bump the version number to 2.0.0, and then upload it to the 3rd-party plugins site as "foo_playcount v2". Then, all direct-links could just point to the 3rd-party plugins site, and you could do test-versions in this forum thread. That way, you would also probably never get into traffic-problems(well, at least not the ones on the inet ;)

- Lyx
Title: Play Counter
Post by: kl33per on 2005-05-17 01:45:02
Quote
If I do, the stable version will always be at the normal address (http://users.tpg.com.au/adsll926/foobar/foo_playcount.rar).

I already decided this before your above post.

About the plugins site, I already have placed it there, but it is still linked to my webspace.  I really don't forsee any problems with it being hosted there.

Edit: In terms of 1.7.6, I'll leave it at the default address until the next test version.  The only feature not finalised is PLAY_STAMP which is off by default anyway.
Title: Play Counter
Post by: Lyx on 2005-05-17 01:56:05
Quote
Quote
If I do, the stable version will always be at the normal address (http://users.tpg.com.au/adsll926/foobar/foo_playcount.rar).

I already decided this before your above post.

About the plugins site, I already have placed it there, but it is still linked to my webspace.  I really don't forsee any problems with it being hosted there.
[a href="index.php?act=findpost&pid=298219"][{POST_SNAPBACK}][/a]

Whops, i completely missed that part about the URL, sorry. I've changed the link in the tag-standards thread to your entry on the 3rd party plugins site. So in case you need to change filenames or URLs for whatever reason, then you just have to update the linking on the 3rd party plugins site.

- Lyx
Title: Play Counter
Post by: kl33per on 2005-05-17 02:14:18
Coolio.
Title: Play Counter
Post by: kl33per on 2005-05-17 04:06:59
foo_playcount 1.7.7 Test Version (http://users.tpg.com.au/adsll926/foobar/foo_playcount_test.rar)
Alright this new test build writes only one PLAY_STAMP tag.  Each timestamp is on a new line.  If people find this easy enough to parse with TAGZ, it will become the stable version.

Edit 1: Can anyone successfully create a playlist (using TAGZ obviously) that lists all the songs played in a particular month based on 1.7.7's version of PLAY_STAMP tag.  If you can, please post and 1.7.7 can become a stable release.

Edit 2: For reference, the TAGZ function to get a new line is $char(10).

Edit 3: Updated the URL.
Title: Play Counter
Post by: Silverbolt on 2005-05-17 08:24:09
Quote
Edit 1: Can anyone successfully create a playlist (using TAGZ obviously) that lists all the songs played in a particular month based on 1.7.7's version of PLAY_STAMP tag.  If you can, please post and 1.7.7 can become a stable release.[a href="index.php?act=findpost&pid=298239"][{POST_SNAPBACK}][/a]


Checking for the month of May:
Code: [Select]
// 0-4: year, 6-7: month, 9-10: date
// 12-13: hour, 15-16: minute, 18-19: second
$puts(start,6)
$puts(end,7)

// desired value
$puts(val,05)

$puts(stamp,$meta(play_stamp))

$if($strcmp($substr($get(stamp),$get(start),$get(end)),$get(val)),1,
$puts(stamp,$insert($get(stamp),,$strchr($get(stamp),$char(10))))

$if($strcmp($substr($get(stamp),$get(start),$get(end)),$get(val)),1,
$puts(stamp,$insert($get(stamp),,$strchr($get(stamp),$char(10))))

$if($strcmp($substr($get(stamp),$get(start),$get(end)),$get(val)),1,
$puts(stamp,$insert($get(stamp),,$strchr($get(stamp),$char(10))))

)))

Horribly, horribly slow. Doesn't include error checking (i.e. checking for %W on a line that doesn't have it), but should give you an idea. The code above only checks the first 3 lines of the play_stamp field. To check more, keep pasting that 2-line segment  over and over and add another parenthesis to the end for each one (obvious disadvantage).
Title: Play Counter
Post by: krazy on 2005-05-17 10:37:02
Quote
About the external database issue.  I may investigate adding MySQL/SQLite support due to the lack of other requested features.  It might not be for a little while though.  If I do, I will atempt to have it all contained in the one plugin with the ability to write tags to file, database, or both.
[a href="index.php?act=findpost&pid=298207"][{POST_SNAPBACK}][/a]

This would be my most wanted feature. It's nice to not have to actually modify music files themselves.

Otherwise, great work on this plugin!
Title: Play Counter
Post by: topdownjimmy on 2005-05-17 11:37:35
for the extended playlist generator:

Code: [Select]
$strstr($meta(play_stamp),-05-) GREATER 0

Seems to work for me...this seems too easy to be true...is it correct or am I making a fool of myself here?  Or both!

Year could similarly be found by searching for '2005-', day by '-15 ', hour=' 12:', minute=':45:', second=':00 ', day of week=' 6 ', if you put a space after the %W in your preferences.

Thank god for those delimiters!  I was fighting against them in the standards debate earlier this year.  How prescient of the rest of you! 

New challenge: a playlist for a specific length of time (one week)?  A playlist of the songs most often played on Sunday (not just played at least once on a Sunday)?

Some tagz functions that don't exist that might be useful:

* for-loops
* number of occurences of a given string/character in a tag field
* metadata index number that contains the sought value
Title: Play Counter
Post by: kl33per on 2005-05-17 14:36:12
So everyone is happy with PLAY_STAMP adding one timestamp per line and not having multiple PLAY_STAMP tags?

Edit: In other words, are there any advantages to using multiple PLAY_STAMP tags (as apposed to one that writes each timestamp on a new line) in terms of playlist generation.
Title: Play Counter
Post by: Silverbolt on 2005-05-17 16:01:21
topdownjimmy: good stuff ($meta(play_stamp) HAS "-05-" seems to work too)

Quote
Edit: In other words, are there any advantages to using multiple PLAY_STAMP tags (as apposed to one that writes each timestamp on a new line) in terms of playlist generation.[a href="index.php?act=findpost&pid=298324"][{POST_SNAPBACK}][/a]

Probably length of time as topdownjimmy mentioned and multiple constraints (Sundays + mornings).
Title: Play Counter
Post by: kl33per on 2005-05-17 16:22:50
Couldn't you do one week (crudely) with something like:

Code: [Select]
$meta(play_stamp) HAS "2005-05-15" OR $meta(play_stamp) HAS "2005-05-16" OR $meta(play_stamp) HAS "2005-05-17" OR $meta(play_stamp) HAS "2005-05-18-" etc.


How would you do Sunday's + Mornings with multiple PLAY_STAMP fields?  I guess what I'm asking is, do people want the plugin to write multiple fields, or only one field.
Title: Play Counter
Post by: Silverbolt on 2005-05-17 17:57:59
Quote
How would you do Sunday's + Mornings with multiple PLAY_STAMP fields?  I guess what I'm asking is, do people want the plugin to write multiple fields, or only one field.[a href="index.php?act=findpost&pid=298365"][{POST_SNAPBACK}][/a]

Sunday 4-6 am:
Code: [Select]
play_stamp IS "* 04* 1" OR play_stamp IS "* 05* 1" OR play_stamp IS "* 06* 1"

I was thinking of a better way, but looks like you can't use simple search on titleformatted strings.

Don't really care whether it's one or multiple fields, but since it sounds mostly like an aesthetic issue in foo_infobox, I'm hoping Nirana replies.
Title: Play Counter
Post by: jkwarras on 2005-05-17 18:05:31
One feature request: Option to add a tag with the date the file was rated (i.e. 2005-05-17 14:05:56), something like LAST_RATED.
Title: Play Counter
Post by: Lyx on 2005-05-17 18:18:46
Quote
One feature request: Option to add a tag with the date the file was rated (i.e. 2005-05-17 14:05:56), something like LAST_RATED.
[a href="index.php?act=findpost&pid=298383"][{POST_SNAPBACK}][/a]

Sounds to me, like this would be the job of a seperate rating-plugin. I mean, what does a rating-timestamp have to do with "play_counter"?

We're lacking a good rating-plugin anyways, so that would be possible feature for such a plugin. Since it then wouldn't be tied anymore to the play_count plugin, we could as well forget the underscores, and just make it RATING TIMESTAMP - since it wouldn't be part of the play_count-family of tags anymore.

- Lyx
Title: Play Counter
Post by: jkwarras on 2005-05-17 18:44:54
Quote
Sounds to me, like this would be the job of a seperate rating-plugin. I mean, what does a rating-timestamp have to do with "play_counter"?

You're completely right, I just mess my mind with another plugin the foo_quicktag_sql plugin, and this has already been implemented. Sorry 
Title: Play Counter
Post by: topdownjimmy on 2005-05-17 22:44:51
Quote
topdownjimmy: good stuff ($meta(play_stamp) HAS "-05-" seems to work too)[a href="index.php?act=findpost&pid=298356"][{POST_SNAPBACK}][/a]

::slaps forehead::

I'm really troubled by the possibility that we'll be limiting future functionality by settling on the wrong format (line breaks vs. multiple fields).  I know that a single, delimited field can be split into multiple fields, so it seems we'd be safe as long as the separator we use is functional as a splitting character...if you see what I mean.  In masstagger, can you split a single field by its line breaks?

If not, maybe we should consider commas instead of line breaks.  It'll be as unobtrusive in the file info box as line breaks would...looking at the actual data in the field would be a bit confusing, but how often do you need to view the data like that?  Plus, if then in the future someone realizes that the historical data could be parsed for complex operations more easily if it's split into multiple fields, we could always just split our single field with masstagger.

edit: the reason i have the feeling that this might rely on multiple fields is that metadata stored in multiple fields is indexed, so i can see the date of the fourth time the track was played more easily...and in fact, if we instead use line breaks and include usernames, there's no way at all to find the time of the fourth play.  i don't know, somehow i just foresee indexing coming in really handy when the manipulation of this data gets really involved.
Title: Play Counter
Post by: topdownjimmy on 2005-05-17 22:48:11
a bit offtopic, but as i was thinking about all this code required for querying specific dates and such, i had a vision of a playlist generator with a calendar-like interface, automating all that complex code (something like what i've seen in google's picasa software).  why isn't there a more intuitive playlist generator, with simple drop-down menus, check boxes, etc?

i didn't want to start an entirely new thread for some pipe dream...someone either tell me i'm deluded or start theorizing about the way this could look and function in a new thread.
Title: Play Counter
Post by: Lyx on 2005-05-17 23:22:17
The play-stamp idea shows quite well the limitations of TAGZ..... in any other high-level language, i would just convert the fields into an array, and from there on retrieving or modifying keys would be as easy as doing a $substr(). Lets hope that one of the new features in the next fb2k-version will be a new powerful structured scripting-language (or the existing c-like language with good docs and additional features).

- Lyx
Title: Play Counter
Post by: topdownjimmy on 2005-05-17 23:27:09
Quote
Lets hope that one of the new features in the next fb2k-version will be a new powerful structured scripting-language (or the existing c-like language with good docs and additional features).[a href="index.php?act=findpost&pid=298441"][{POST_SNAPBACK}][/a]

The next version of foobar has been in the back of my mind thinking about this as well, in terms of which format for play_stamp would be better suited for the most probable new features (whatever we speculate those might be).
Title: Play Counter
Post by: foosion on 2005-05-17 23:49:24
Tagz is designed to be a titleformatting language; it will not be turned into a full-fledged scripting language.
Title: Play Counter
Post by: kl33per on 2005-05-18 08:21:25
A note about the test version above.

Why haven't any of you downloaded it?  I just realised that I got the URL wrong, but thus far no one has whined about it.  If you don't download these things and give me feed back, I might as well give up.

@ topdownjimmy above, yeah, your definately deluded.  I'm just kidding, but it would be quite the behemoth of programming challenges.

Edit: It seems it's not possible to split a field up via line breaks.
Title: Play Counter
Post by: Silverbolt on 2005-05-18 08:59:18
Quote
A note about the test version above.

Why haven't any of you downloaded it?  I just realised that I got the URL wrong, but thus far no one has whined about it.[a href="index.php?act=findpost&pid=298509"][{POST_SNAPBACK}][/a]

I did. Just added added the missing 's' myself and figured others did the same; didn't feel like whining about it at the time..
Title: Play Counter
Post by: kl33per on 2005-05-18 09:00:05
foo_playcount 1.7.8 *TEST VERSION* (May 18 2005) (http://users.tpg.com.au/adsll926/foobar/foo_playcount_test.rar)

1) Changed PLAY_STAMP so that it writes each stamp to the same field seperated by a ";" character.

@ above, no worries, was just a little concerned + I've had a bad day, so I may have come off a little harsh, sorry.

Edit: Have removed PLAY_STAMP from the available stable 1.7.6 version so that users who get it from the plugins site will get only the stable features.
Title: Play Counter
Post by: krazy on 2005-05-18 09:32:42
Am I the only one here who thinks that the this multitude of personal play-data such as PLAY_STAMP, LAST_PLAYED, FIRST_PLAYED, PLAY_COUNTER, ratings etc really doesn't belong in tags?

And adding user info to tags? No thanks. This PLAY_STAMP field adding a line every time a song is played is especially of concern to me (have I understood this correctly?). Seems like tags will end up bloated ala lyrics tags, band history etc. Some people may like this sort of info, but not many IMO.

This sort of data should really be stored in a separate database IMHO.

Edit: spelling
Title: Play Counter
Post by: kl33per on 2005-05-18 09:46:00
You're not the only person who thinks this, but foobar cannot do this natively.  Personally, I use all the tags, but some people might prefer to only use the PLAY_COUNTER tag.  All the tags are optional.  You can even turn all the tags off, and then the plugin would do nothing.

Edit: About the PLAY_STAMP tag.  Yes it does have the ability too become bloated, but I did not add in this feature for the majority.  This feature is disabled by default, so as not to "bloat" peoples tags unnecessarily.  A select few people will hopefully find this feature interesting/useful and will make use of it.  Those who don't find it useful or don't care need not give it a second thought.
Title: Play Counter
Post by: Zurman on 2005-05-18 09:58:43
What about "blck tag update operation" ?
Title: Play Counter
Post by: kl33per on 2005-05-18 10:17:04
People are aware of this option, but it blocks all tag updates.  If you ever wanted to edit the tags, eg. to correct a spelling mistake, it wouldn't be written to the file.  As has been mentioned before, the only reasonable solution is the ability to specify database only tags.
Title: Play Counter
Post by: jkwarras on 2005-05-18 10:54:34
Quote
Am I the only one here who thinks that the this multitude of personal play-data such as PLAY_STAMP, LAST_PLAYED, FIRST_PLAYED, PLAY_COUNTER, ratings etc really doesn't belong in tags?
[a href="index.php?act=findpost&pid=298525"][{POST_SNAPBACK}][/a]

That's why I've switched to kode54 foo_playcount version and foo_quicktag_sql. Both uses sqlite DB, and really easy to use, at least my files doesn't change everytime I rate or play them. The only thing I miss it's the new features that kl33per has implemented in the new 'normal' version of foo_playcount.
Title: Play Counter
Post by: topdownjimmy on 2005-05-19 02:41:39
Quote
Am I the only one here who thinks that the this multitude of personal play-data such as PLAY_STAMP, LAST_PLAYED, FIRST_PLAYED, PLAY_COUNTER, ratings etc really doesn't belong in tags?

And adding user info to tags? No thanks. This PLAY_STAMP field adding a line every time a song is played is especially of concern to me (have I understood this correctly?). Seems like tags will end up bloated ala lyrics tags, band history etc. Some people may like this sort of info, but not many IMO.

This sort of data should really be stored in a separate database IMHO.

Edit: spelling
[a href="index.php?act=findpost&pid=298525"][{POST_SNAPBACK}][/a]

Will someone please present to me the strongest case they can make against keeping things like this stored within the files themselves?

This isn't a challenge, there's just a strong purist tendency in me that nags me every once in a while when I hear things like this.  I love the ability to have this play data, and that wins out over my desire for tidiness right now, but if someone can convince me why this is bad I'd love to hear it...
Title: Play Counter
Post by: simmosn on 2005-05-19 03:23:22
Quote
Quote
Am I the only one here who thinks that the this multitude of personal play-data such as PLAY_STAMP, LAST_PLAYED, FIRST_PLAYED, PLAY_COUNTER, ratings etc really doesn't belong in tags?

And adding user info to tags? No thanks. This PLAY_STAMP field adding a line every time a song is played is especially of concern to me (have I understood this correctly?). Seems like tags will end up bloated ala lyrics tags, band history etc. Some people may like this sort of info, but not many IMO.

This sort of data should really be stored in a separate database IMHO.

Edit: spelling
[a href="index.php?act=findpost&pid=298525"][{POST_SNAPBACK}][/a]

Will someone please present to me the strongest case they can make against keeping things like this stored within the files themselves?

This isn't a challenge, there's just a strong purist tendency in me that nags me every once in a while when I hear things like this.  I love the ability to have this play data, and that wins out over my desire for tidiness right now, but if someone can convince me why this is bad I'd love to hear it...
[a href="index.php?act=findpost&pid=298697"][{POST_SNAPBACK}][/a]


For me it's the fact that I back all my mp3's up every day using a DOS command that only copies modified files acorss from d:\ to f:\

Therefore, if I write all play count data to the file instead of the database only, I have to copy across a file whenever it's played as it has a tag that's been modified

Hope that made sense :S
Title: Play Counter
Post by: Lyx on 2005-05-19 03:53:04
Do you folks realize that db-only tags are among the most-wanted features for fb2k, and that *if* the next fb2k-version implements this, you will have 3 storage-methods for metadata: tags, fb2k's db, sql?

I dont want to discourage the sql-folks here - i find it admirable, that you do something about the problem instead of waiting. But i'm a bit affraid of the scenario which would happen when fb2k itself implements the "proper"-solution.

- Lyx
Title: Play Counter
Post by: jkwarras on 2005-05-19 07:31:32
Quote
Do you folks realize that db-only tags are among the most-wanted features for fb2k, and that *if* the next fb2k-version implements this, you will have 3 storage-methods for metadata: tags, fb2k's db, sql?
[a href="index.php?act=findpost&pid=298703"][{POST_SNAPBACK}][/a]

AFAIK, there's no public knowdlegde that fb2k 0.9 will implement db-only tags. If someone knows something more I'll glad to hear it

Anyway, I don't see the problem if this was implemented, I guess you could always tag most of db-only tags (sql) back to the file and retag into fb2k DB.
Title: Play Counter
Post by: Olive on 2005-05-19 07:51:46
Quote
Will someone please present to me the strongest case they can make against keeping things like this stored within the files themselves?

This isn't a challenge, there's just a strong purist tendency in me that nags me every once in a while when I hear things like this.  I love the ability to have this play data, and that wins out over my desire for tidiness right now, but if someone can convince me why this is bad I'd love to hear it...
[a href="index.php?act=findpost&pid=298697"][{POST_SNAPBACK}][/a]

As for what I'm concerned, this is sub-optimal because I quite often play 60+ minutes Vorbis files, which (AFAIK) Foobar tags at the begining, hence several second gaps with intense hard disk actvity between those tracks. It's already been discussed so let's just hope that tag padding support for ogg vorbis isn't at the very end of Peter's priority list for future versions
Title: Play Counter
Post by: kl33per on 2005-05-19 09:18:40
I thought Vorbis was gapless?  Unless you're talking about a portable device with Vorbis support.

I don't know why this topic has gone in this direction.  Most people seem to agree that not storing this information in the tags of a file is a good.  The simple fact of the matter is that in the short term, I'm not experienced enough, nor have enough free time to create a version of foo_playcount with my updates and external database support.  Add this to the fact that I don't really care that they are stored in tags, and my motivation to do it becomes quite low.

I'm not saying I won't do it.  I'm saying, don't expect it anytime soon.  If anybody wants to modify my source code, be my guest.
Title: Play Counter
Post by: drbeachboy on 2005-05-19 15:08:03
Hopefully, either Kode or Fermion will fix the tag updating problem with sql version of foo_playcount. With using my lossy audio files mostly on the iPod, these tag writing versions cause too many problems passing duplicate files to the iPod using foo_pod.

I do thank all of you who have worked on the varying versions of Playcount. I think we the users should be greatful that we have members in this forum who work very hard to make foobar a varied and wonderful program to play audio files.

Again, my sincere thanks!
Title: Play Counter
Post by: MC Escher on 2005-05-19 16:28:36
Personally I prefer to have most data in tags. I don't care if files change a bit, foobar doesn't seem to mind, and I'm the only person using those files.
Title: Play Counter
Post by: metal_termite on 2005-05-19 18:59:49
What kind of queries can be made with the FIRST_PLAYED tag? I don't understand the relevance of that tag although I'm sure there is a very good reason for it.

Quote
Personally I prefer to have most data in tags. I don't care if files change a bit, foobar doesn't seem to mind, and I'm the only person using those files.
[a href="index.php?act=findpost&pid=298804"][{POST_SNAPBACK}][/a]

Ditto.
Title: Play Counter
Post by: Lyx on 2005-05-19 19:16:41
Quote
What kind of queries can be made with the FIRST_PLAYED tag? I don't understand the relevance of that tag although I'm sure there is a very good reason for it.

You can calculate the "age" of tracks as well as "average plays per day".
- Lyx
Title: Play Counter
Post by: gob on 2005-05-20 00:46:48
guy, your plugin is removing all the (tags that are in brackets) from my files.


Edit: can someone else confirm this is hapening?
Title: Play Counter
Post by: kl33per on 2005-05-20 04:10:48
I don't understand what you're saying.  What tags in brackets? More information required.
Title: Play Counter
Post by: gob on 2005-05-20 05:32:24
basically when i play a file without your plugin, the files play and life goes on. the tags dont change. now when i run with your plugin, every file that plays and gets updated, the tags get screwed up. i have a couple hunderd files that have the album  tag set to things like  dazed and condused (soundtrack), or blow (sound track). as each file plays, the tag gets renamed to dazed and confused or blow. anything in quotes is removed as the file plays. this also happened to all the artist and track title tags. i have no idea how many tracks got renamed in the last while, but man, that is not cool.
Title: Play Counter
Post by: kl33per on 2005-05-20 05:36:18
I do not understand how this is at all possible.  My plugin only ever touches the tags it deals with (i.e PLAY_COUNTER, FIRST_PLAYED, LAST_PLAYED, and PLAY_STAMP).  There is absolutely nothing in the code that deals with any other tags.  I can only assume that the tags with brackets in the have not been written to the file (i.e. are only stored in the database), and then when foo_playcount updates the tags, it doesn't use the moddified database tags, but instead the tags in the original file.  This is not a problem with foo_playcount, but a problem with your tags.
Title: Play Counter
Post by: gob on 2005-05-20 05:39:02
omg i posted on 4:20. thats funny as i had.. nm..

try it man, copy some files, set the tags to have album, title, and artist to have some text in ()'s.

edit: then let the file play.
Title: Play Counter
Post by: kl33per on 2005-05-20 05:40:34
I do have files and albums with tags in brackets and it does not happen to me.  It is not possible for foo_playcount to be causing this.  It is a problem with your tags and the foobar2000 database not corelating.
Title: Play Counter
Post by: gob on 2005-05-20 05:51:04
it seems to be selective...

i dont know whats goin on with these tags. i'll play with it another time..
Title: Play Counter
Post by: Silverbolt on 2005-05-20 06:01:17
Quote
...so I may have come off a little harsh, sorry.[a href="index.php?act=findpost&pid=298518"][{POST_SNAPBACK}][/a]
Not at all.

Quote
try it man, copy some files, set the tags to have album, title, and artist to have some text in ()'s.

edit: then let the file play.[a href="index.php?act=findpost&pid=298972"][{POST_SNAPBACK}][/a]
Can't reproduce either. Brackets, parenthesis, quotes, whatever. My guess is that foo_playcount's updates are only revealing existing inconsistencies with your metadata. Only other thing I can think of is that your formatting string changes its artist/album display based on foo_playcount's fields, but I don't think that's likely. Will continue testing.
Title: Play Counter
Post by: hoelk on 2005-05-20 06:03:59
what i really LOVED to see would be db only mask via directory also, not only via extension
Title: Play Counter
Post by: gob on 2005-05-20 06:06:52
i figured it out. i think it has to do with inconsistant tags between the read only files and the db. the tags dont seem to revert back untill the plugin tried to write to them.
Title: Play Counter
Post by: kl33per on 2005-05-20 07:14:45
Quote
what i really LOVED to see would be db only mask via directory also, not only via extension
[a href="index.php?act=findpost&pid=298979"][{POST_SNAPBACK}][/a]

Looking into it.
Title: Play Counter
Post by: spaceships on 2005-05-21 01:42:36
if i specify the form of which i want to see the 'appended information' i see two versions of it, the old one and the new one, is this a bug?
Title: Play Counter
Post by: kl33per on 2005-05-21 07:25:03
I don't know what you are asking.  Be more specific.
Title: Play Counter
Post by: fabiospark on 2005-05-21 13:05:04
Is there any support for multi values fields?

Let's say I have a multi values mood tag and I want to quickly change one of the values I have entered, say 'uplifting', to something else.
I would like to be able to use:

Code: [Select]
$replace(mood,uplifting,blah)

This would avoid me to have to guess if the mood I'm changing is the first or not in the values sequence.

I have a counter solution if the mood (with no %%) is not supported:
Code: [Select]
$replace(%mood%,uplifting', ',blah,', 'uplifting,blah)


This should be able to work in both cases.

The most missing thing is that I can't replace those blahs with a sort of %_user_input% function that would let me write something on fly.

(see the sql modified for reference).

Thanks.
Title: Play Counter
Post by: topdownjimmy on 2005-05-21 14:34:13
Quote
Is there any support for multi values fields?

Let's say I have a multi values mood tag and I want to quickly change one of the values I have entered, say 'uplifting', to something else.
I would like to be able to use:

Code: [Select]
$replace(mood,uplifting,blah)

This would avoid me to have to guess if the mood I'm changing is the first or not in the values sequence.

I have a counter solution if the mood (with no %%) is not supported:
Code: [Select]
$replace(%mood%,uplifting', ',blah,', 'uplifting,blah)


This should be able to work in both cases.

The most missing thing is that I can't replace those blahs with a sort of %_user_input% function that would let me write something on fly.

(see the sql modified for reference).

Thanks.
[a href="index.php?act=findpost&pid=299278"][{POST_SNAPBACK}][/a]

I know masstagger has a "split fields by separator" function.  This is what I use to split mood-like information I get from allmusic.  Once separated, you can access each value by an index number: $meta(moods,2) would give you the second value for your moods.

Unfortunately there's no way (that I know of) to know which index number a certain value has.  I think this would be valuable, and could mirror the $strstr() function with something like $metastr(uplifting), returning the index of the value "uplifting."  $meta(moods,$metastr(uplifting)) would return "uplifting," for example (useless, I know, but demonstrates the inverseness of these two functions).
Title: Play Counter
Post by: spaceships on 2005-05-23 01:40:40
Quote
I don't know what you are asking.  Be more specific.
[a href="index.php?act=findpost&pid=299230"][{POST_SNAPBACK}][/a]



When i specify what i want in the appended space

i.e "%D/%M/%Y"

i'd get something like this

05-18-2005 11:30:03 18/05/05


is there anyway to get rid of the "05-18-2005 11:30:03" and just have the "18/05/05" display?
Title: Play Counter
Post by: kockroach on 2005-05-23 01:51:34
Quote
Edit 2: And for the record, custom field names will not return.


I think this probably answers your question.

Edit:  Oops....I see that he added a few things since the last one I had.....my bad.
Title: Play Counter
Post by: kl33per on 2005-05-23 03:13:26
Quote
Quote
I don't know what you are asking.  Be more specific.
[a href="index.php?act=findpost&pid=299230"][{POST_SNAPBACK}][/a]



When i specify what i want in the appended space

i.e "%D/%M/%Y"

i'd get something like this

05-18-2005 11:30:03 18/05/05


is there anyway to get rid of the "05-18-2005 11:30:03" and just have the "18/05/05" display?
[a href="index.php?act=findpost&pid=299586"][{POST_SNAPBACK}][/a]
There is no way to get rid of "2005-05-18 11:30:03" before your custom timestamp of "18/05/05".  This is by design and not a bug.  You can use TAGZ to display the date as "18/05/05" without appending any information.

Edit:  This will display the date as you require it, just using the default tag.
Code: [Select]
$if(%last_played%,$substr(%last_played%,9,10)/$substr(%last_played%,6,7)/$substr(%last_played%,3,4),Never)
Title: Play Counter
Post by: Lyx on 2005-05-23 05:19:52
Quote
When i specify what i want in the appended space

i.e "%D/%M/%Y"

i'd get something like this

05-18-2005 11:30:03 18/05/05


is there anyway to get rid of the "05-18-2005 11:30:03" and just have the "18/05/05" display?

Besides of what kl33per said, see here for more info on the FIRST_PLAYED and LAST_PLAYED tag.
http://www.hydrogenaudio.org/forums/index....showtopic=31530 (http://www.hydrogenaudio.org/forums/index.php?showtopic=31530)

As you can see, changing the hardcoded part of the first_played- and last_played-timestamp(the data before the "appended"-info) is not allowed. This is to ensure compatibility with a wide variety of formatting strings and plugins. If these parts of the tags would be configurable, then public formatting-strings and plugins couldn't know what to look for - and therefore could not support this plugin.
Or in short: its hardcoded, because otherwise public formattings and plugins could not support this plugin.

edit: the above link also contains codesnippets which show you how to reformat the tag in formatting strings - because thats what formatting strings are there for: to "format" the output ;)

- Lyx
Title: Play Counter
Post by: OCedHrt on 2005-05-23 06:53:25
There seems to be a mem leak in the sqllite plugin and so I have switched over to the new play count
Title: Play Counter
Post by: spaceships on 2005-05-23 22:26:00
Thank you lyx and kl33per
Title: Play Counter
Post by: hulala on 2005-05-27 09:56:45
Quote
There is no way to get rid of "2005-05-18 11:30:03" before your custom timestamp of "18/05/05".  This is by design and not a bug.  You can use TAGZ to display the date as "18/05/05" without appending any information.

Edit:  This will display the date as you require it, just using the default tag.
Code: [Select]
$if(%last_played%,$substr(%last_played%,9,10)/$substr(%last_played%,6,7)/$substr(%last_played%,3,4),Never)

[a href="index.php?act=findpost&pid=299604"][{POST_SNAPBACK}][/a]

I'm sorry but may I ask that is it posibble if we change it to AM PM instead of 24 hours time? I mean something like this ---> 05-18-2005 02:30:03 PM
Title: Play Counter
Post by: kl33per on 2005-05-27 10:16:32
Code: [Select]
$if(%last_played%,$substr(%last_played%,9,10)/$substr(%last_played%,6,7)/$substr(%last_played%,1,4)' @ '$ifgreater($substr(%last_played%,12,13),12,$sub($substr(%last_played%,12,13),12),$substr(%last_played%,12,13))':'$substr(%last_played%,15,16) $ifgreater($substr(%last_played%,12,13),12,PM,AM), Never)


Edit 1: Sorry, there's a mistake above, give me a minute to fix it.

Edit 2: Fixed.

Edit 3: Nope Still broken, hold on.

Edit 4: Fixed for sure now.
Title: Play Counter
Post by: hulala on 2005-05-27 11:13:42
thanks a million !!! You rocks man... I love you dude...

[span style='font-size:14pt;line-height:100%']You ROCK My WORLD !![/span]
Title: Play Counter
Post by: adrianmak on 2005-05-29 12:38:35
what is the DB which playcount plugin refer to ? a tag in mp3 file or something other ?
Title: Play Counter
Post by: kl33per on 2005-05-29 14:48:28
There is an older, modified version of foo_playcount that stores the tags in an external MySQL of SQLite database.  It has not been updated for some time, and does not have any of the new features that my version has.  My version writes the tags directly to file.

Edit: Unless your talking about the database referred to in the Preferences dialog.  This is the foobar2000 database.  It is not enabled in a default foobar installation (I don't think).  You can have foo_playcount only work on files that are part of the database.  To enable the database, go to foobar2000 -> Preferences -> Database.
Title: Play Counter
Post by: adrianmak on 2005-05-30 09:35:43
I have enabled the fb database.

how do I know if the playcount plugin is in work ?
Title: Play Counter
Post by: kl33per on 2005-05-30 13:51:51
It will write, by default, three tags to your files, after 50% of the song has played.  These tags are PLAY_COUNTER, FIRST_PLAYED, and LAST_PLAYED.  If it writes these, it is working.
Title: Play Counter
Post by: nWolc on 2005-05-31 22:54:59
sorry if its the wrong thread but I would like to know how could I add to my trackinfo panel a line that would tell me exactly how many times I have played the band i'm listening at the moment or on what band I got my mouse on or how many times I have played the album. ofcourse I can just count with calc but its just way too much work. I'm not much of a coder so thats why i'm bothering you.
Title: Play Counter
Post by: Lyx on 2005-05-31 23:33:17
Quote
sorry if its the wrong thread but I would like to know how could I add to my trackinfo panel a line that would tell me exactly how many times I have played the band i'm listening at the moment or on what band I got my mouse on or how many times I have played the album. ofcourse I can just count with calc but its just way too much work. I'm not much of a coder so thats why i'm bothering you.
[a href="index.php?act=findpost&pid=302242"][{POST_SNAPBACK}][/a]

Not possible with fb2k 0.8 (and i would "guess" also not with 0.9). Reason is that strings only see the current track - they are "blind" of other tracks. However, a plugin "could" achieve this(nope, i dont think one exists which can do it).
Title: Play Counter
Post by: Lyx on 2005-05-31 23:39:17
Quote
I have enabled the fb database.

how do I know if the playcount plugin is in work ?
[a href="index.php?act=findpost&pid=301684"][{POST_SNAPBACK}][/a]

If you dont want to code your own playlist-formatting string(or dont know how) with playcount-support, then you could try the playlist designs "Azrael" or "Navigator-Suite". Both at least partially support it. I think Navigator supports more playback stats, but the last "official" release had a bug with calculating plays/day.
Title: Play Counter
Post by: jesusxl on 2005-06-06 16:22:27
Quote
this sql plugin sounds great. if only there was a way to get the ratings into it.
also, with this plugin, how does it associate tags with the songs? does it go by path? is it possible to move files to different directories and retain thier entry in the sql db?
[a href="index.php?act=findpost&pid=276860"][{POST_SNAPBACK}][/a]


I also wonder if db info would be retained if you'd move dirs.

By the way: thanks to everyone doing a good job on writing and improving the scripts!
Title: Play Counter
Post by: jesusxl on 2005-06-06 16:28:06
I asked before how I could sort my playlist in a way it would put most played files at top and least played files at bottom... At that time I was using the play count script which wrote to the id3 tags. Now i'm using the script using sqlite, how does it work now?

Thanks a lot!
Title: Play Counter
Post by: jesusxl on 2005-06-06 17:28:38
Quote
Or, %__play_count% if you use my version.
[a href="index.php?act=findpost&pid=255373"][{POST_SNAPBACK}][/a]

Forget about my previous post people, the answer was give a long time ago.
BUT, unfortunately this string does't seem to work 
Code: [Select]
$num($sub(9999,%play_count%),4)

Thanks again for your help
Title: Play Counter
Post by: julien_32 on 2005-06-06 17:54:00
Can collect the date of today since how much day the title was not played?

Edit: for using in Track Info Panel, not in the playlist (I find %_system_day%... but only for Columns UI)
Title: Play Counter
Post by: jesusxl on 2005-06-06 18:02:18
Quote
Quote
Or, %__play_count% if you use my version.
[a href="index.php?act=findpost&pid=255373"][{POST_SNAPBACK}][/a]

Forget about my previous post people, the answer was give a long time ago.
BUT, unfortunately this string does't seem to work 
Code: [Select]
$num($sub(9999,%play_count%),4)

Thanks again for your help
[a href="index.php?act=findpost&pid=304021"][{POST_SNAPBACK}][/a]

Think I found it... I should be:
Code: [Select]
$num($sub(9999,%play_counter%),4)

If you use the sql version, replace %play_counter with %__play_counter%
Title: Play Counter
Post by: Killmaster on 2005-06-06 18:31:23
Quote
I asked before how I could sort my playlist in a way it would put most played files at top and least played files at bottom... At that time I was using the play count script which wrote to the id3 tags. Now i'm using the script using sqlite, how does it work now?

Thanks a lot!
[a href="index.php?act=findpost&pid=304008"][{POST_SNAPBACK}][/a]


%__last_played%

or whatever your tag it plus the two underscores.
Title: Play Counter
Post by: bangbang023 on 2005-06-07 03:54:46
Quote
I'm sorry but may I ask that is it posibble if we change it to AM PM instead of 24 hours time? I mean something like this ---> 05-18-2005 02:30:03 PM
[a href="index.php?act=findpost&pid=300877"][{POST_SNAPBACK}][/a]

this should work. I've whipped it up myself quickly:
Code: [Select]
$if(%last_played%,$substr(%last_played%,9,10)/$substr(%last_played%,6,7)/$substr(%last_played%,3,4) @ $if($greater($substr(%last_played%,12,13),12),$sub($substr(%last_played%,12,13),12),$substr(%last_played%,12,13)):$substr(%last_played%,15,16) $if($greater($substr(%last_played%,12,13),12),PM,AM),)
Title: Play Counter
Post by: Lyx on 2005-06-15 13:46:37
Quote
If you dont want to code your own playlist-formatting string(or dont know how) with playcount-support, then you could try the playlist designs "Azrael" or "Navigator-Suite". Both at least partially support it. I think Navigator supports more playback stats, but the last "official" release had a bug with calculating plays/day.
[a href="index.php?act=findpost&pid=302255"][{POST_SNAPBACK}][/a]

The mentioned bug in Navigator has been fixed. It should now fully support the new  playcount-plugin without flaws.
Title: Play Counter
Post by: kl33per on 2005-06-17 09:13:54
In the next version, I'm thinking of removing the DB Only Mask, as it seems to be to be a usless feature.  It doesn't prevent tag updates, it only delays them until something else updates the tags.  If anyone can give me a good reason to hold on to this feature, please post.
Title: Play Counter
Post by: topdownjimmy on 2005-06-17 12:02:31
Quote
In the next version, I'm thinking of removing the DB Only Mask, as it seems to be to be a usless feature.  It doesn't prevent tag updates, it only delays them until something else updates the tags.  If anyone can give me a good reason to hold on to this feature, please post.
[a href="index.php?act=findpost&pid=306724"][{POST_SNAPBACK}][/a]

Right.  The only way it could be effective is if you never used foobar to modify your tags.  And if that were the case, why aren't you blocking tag updates in foobar altogether?

Not only is it a useless feature, it's deceptive and has led to a lot of confusion from people (including myself many moons ago) who couldn't figure out why the tags got written even with that option checked.

edit: BUT you could make this argument: some people may want the tags written to the file, but not immediately, since on slower computers it may slow down the time it takes to start the next track (especially if they're using id3v2).  So, they might like the option of keeping the data only in the database until other tags are written into the file.  So maybe instead of getting rid of the option altogether, you could rename it "Delay tag writing" or something.
Title: Play Counter
Post by: jkwarras on 2005-06-17 12:12:52
@kl33per: I know you said you have not much motivation into making a sqlite version of your plugin, but did you reconsider it? 

Thanks.
Title: Play Counter
Post by: Lyx on 2005-06-17 13:39:26
Does someone know if fb2k 0.9 will allow db-only tags?
Title: Play Counter
Post by: jkwarras on 2005-06-17 15:02:54
Quote
Does someone know if fb2k 0.9 will allow db-only tags?
[a href="index.php?act=findpost&pid=306756"][{POST_SNAPBACK}][/a]

Yeah, that will be nice to know, so we could only keep one internal DB (and not 1-2 external sqlite). I've been following the 0.9 beta thread but I didn't see anything related.
Title: Play Counter
Post by: kl33per on 2005-06-17 16:07:34
No ones asked Peter as far as I know, and you can't really tell without the SDK.  At least no available plugins make use of DB only tags.

As far as an SQLite version.  If I did make one, it would only support SQLite and not mySQL.  I've started to lay some basic ground work (realy basic  ) for it, but that doesn't mean I'll actually implement.  If I do it won't be a seperate plugin, but integrated into one plugin, with the option to switch between SQLite and tags.  My interest in this has increased, but it was never really my interest that stopped me.  I'm interested in improving this plugin in anyway that I can (even if it doesn't directly benefit me).  What's stopped me is a lack of understanding of C++.  I'm slowly learning, but balancing University, A part-time job, Guitar Playing, The two bands I'm in, and programming, can at times be a little tiresome.  I'm doing this in my free time (which ATM is about 12.30am onwards daily).  It's a feature I would like and would use, but it's pretty hard to implement (at least for me).

Current Goals for Next Version:
- Massive UI update (including more detailed info on all the features)
- Post so I can add more!!

Completed Goals:
- Fix bug in "Immediately Update Songs after X Seconds"
- Finalise PLAY_STAMP format.  PLAY_STAMP now records a complete play history including the FIRST_PLAYED andLAST_PLAYED stamps.
Title: Play Counter
Post by: jkwarras on 2005-06-17 16:20:35
Quote
I'm doing this in my free time (which ATM is about 12.30am onwards daily).  It's a feature I would like and would use, but it's pretty hard to implement (at least for me).
[a href="index.php?act=findpost&pid=306775"][{POST_SNAPBACK}][/a]


That's nice to hear that you'll be interested in implementing the sqlite stuff. Thanks for your time in improving the playcount plugin, believe me as an user it's really appretiated
Title: Play Counter
Post by: Farinhir on 2005-06-26 09:57:03
i do have to say that this is a nice plugin and all, but i am also of the opinion that the external DB would be a good thing also. I have my reasons that i have also decided to not publish online. but they are valid.

other than the external DB being missing i would have to say that this is a nice plugin. BTW, any word from kode on an update?

thx for all the work you have put into this also
Title: Play Counter
Post by: freakonaleash on 2005-06-26 11:33:31
I hope someone could help me with my problem. I have tried to solve it in several hours...

My code in the Track-Info looks like this:
Code: [Select]
Last played: ffffff$substr(%last_played%,9,10).$substr(%last_played%,6,7).$substr(%last_played%,3,4) at ffffff$substr(%last_played%,12,19))


Now i want to replace the month with Jan, Feb, March, and so one.

Does anybody know how to make this?
Sorry for the stupid question, it was answered hundred times...

Thanks.
Title: Play Counter
Post by: topdownjimmy on 2005-06-26 13:21:57
Quote
I hope someone could help me with my problem. I have tried to solve it in several hours...

My code in the Track-Info looks like this:
Code: [Select]
Last played: ffffff$substr(%last_played%,9,10).$substr(%last_played%,6,7).$substr(%last_played%,3,4) at ffffff$substr(%last_played%,12,19))


Now i want to replace the month with Jan, Feb, March, and so one.

Does anybody know how to make this?
Sorry for the stupid question, it was answered hundred times...

Thanks.
[a href="index.php?act=findpost&pid=308977"][{POST_SNAPBACK}][/a]

Code: [Select]
$select($substr(%last_played%,6,7),Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec)

Title: Play Counter
Post by: freakonaleash on 2005-06-26 13:46:24
It looks so easy. 
You're my man. Thank you very much .
Title: Play Counter
Post by: tksh on 2005-06-27 17:39:47
Quote
In the next version, I'm thinking of removing the DB Only Mask, as it seems to be to be a usless feature.  It doesn't prevent tag updates, it only delays them until something else updates the tags.  If anyone can give me a good reason to hold on to this feature, please post.
[a href="index.php?act=findpost&pid=306724"][{POST_SNAPBACK}][/a]


I would hope you can keep this feature.  Though it is indeed misleading, it does still work out for me (and possibly for other people too).

My personal collection goes into a music/ directory while new downloads and rips go into a work/ directory situated somewhere else.  foobar itself is configured to only add files in music/ to its internal database and playcount skips tracks not in the internal database.

Files in the work/ directory are added to a temporary playlist and listened through to decide what to keep and what not to, go through ReplayGain analysis and tagging.  So any tag modifications done on these files, I want them to be written to the files directly.

After that process, they're moved into the music/ directory.  I consider the tags on all those files to be perfect, I don't want them be modified, appended or removed.  I do not ever use masstagger on these files, the only tag updates done to these files are the playcount data.

So with the current 'DB mask only' feature checked, tag updates to files in the work/ directory are written to the files directly and without playcount data (the desired effect).  And tag updates to files in the music/ directory are stored into the internal database only (again, the desired effect).

So I guess, by luck, I've developed a process where the 'misleading' behaviour of the DB mask only option doesn't affect me and allows the option to work as it should.  Of course, if a future version of playcount uses SQLite, then this renders my rebuttal moot but in the meantime, may I request this feature to be kept?
Title: Play Counter
Post by: kl33per on 2005-06-27 17:51:22
I'm planning to do an overhaul of the UI, so much more explaining of this 'feature' (read: hack) will have to be done in the preferences dialog, if it is kept.  I can only see it as a useless feature that confuses new users.  If your music files are so 'perfect' why not just block all tag updates?  It will have exactly the same effect.
Title: Play Counter
Post by: tksh on 2005-06-27 20:03:20
Quote
I'm planning to do an overhaul of the UI, so much more explaining of this 'feature' (read: hack) will have to be done in the preferences dialog, if it is kept.  I can only see it as a useless feature that confuses new users.  If your music files are so 'perfect' why not just block all tag updates?  It will have exactly the same effect.
[a href="index.php?act=findpost&pid=309265"][{POST_SNAPBACK}][/a]


Because with the block all tag updates option checked, I can't use the masstagger to perform tag operations on the files in my work/ directory.  The point is that, I have two main directories where foobar plays files from.  In one directory, I only want the files to be read and meta-deta like playcount to be stored into an internal DB.  In the other directory, I want to be able to modify the files directly.  So using a broad "block all tag updates" approach isn't workable for me.
Title: Play Counter
Post by: kl33per on 2005-06-27 20:18:04
You could turn off "block all tag updates" when using your work directory.  Seriously, how often are you adding music to your collection, unless your downloading vast amounts of music illegally.

All I'll say for now is we will see.  I can't say I like it, and if I was building this plugin from the ground up, this 'feature' would definately not be included.  I'm certainly not convinced that it should be kept, but we will see.

Other then (very) minorly fragmenting your drive, and a moral objection to storing statistical data in tags, there is very little reason not to write tags to the file.
Title: Play Counter
Post by: tksh on 2005-06-27 20:47:37
You could imagine me as a hoarder of music with gigabytes of mp3s in my donwload queue and a fanatic attempt to perfectly tag everything I hoarde... but fair enough on your point about enabling and disabling the block all tag updates option as I need to.  I guess it's just a matter of an extra step that I don't have to deal with currently.

The main reason why I object to storing playcount data into the files directly is because I feel they do not belong.  Arist, title, disc number, etc. all describe attributes that are inherent to the song.  Play-count on the other hand, is arbitrary and an external property of the file.  But I wouldn't call it a moral objection, just preference.  There's also the minor quip that storing play-count data directly to the file means in a house where the files are shared amongst multiple users, the play-count then becomes how many times the song has been played globally.  But I digress.
Title: Play Counter
Post by: pIv on 2005-07-01 11:07:50
To kl33per

Now I change rating tag with QuickTag scrip manualy.

It is possible add next feature (optionally): set 5 {r1, r2, r3, r4, r5} number for rating. If play_counter greater then r and less or equall  r[i+1] then rating set to i.

Any people may set  its own array of rating.

In this way manually changing rating tag would be lost.
Title: Play Counter
Post by: kl33per on 2005-07-01 11:29:39
Took me a while to understand what your saying, but I think I have it now.  You don't need another tag to do this.  It could be done with TAGZ code.
Title: Play Counter
Post by: pIv on 2005-07-01 12:19:29
I don't want change tag manualy, but I want automaticaly change %rating% when change play_counter in this nice plugin.
Title: Play Counter
Post by: kl33per on 2005-07-01 14:52:05
I know what you want.  I saying that based on your suggestion, you don't need to have a rating tag at all.  You could 'calculate' your rating with TAGZ code.  For an example on how a similar sort of feature is implemented see the "hotness" (http://www.hydrogenaudio.org/forums/index.php?showtopic=31287&hl=) thread.
Title: Play Counter
Post by: Farinhir on 2005-07-02 13:25:46
Quote
I know what you want.  I saying that based on your suggestion, you don't need to have a rating tag at all.  You could 'calculate' your rating with TAGZ code.  For an example on how a similar sort of feature is implemented see the "hotness" (http://www.hydrogenaudio.org/forums/index.php?showtopic=31287&hl=) thread.
[a href="index.php?act=findpost&pid=310328"][{POST_SNAPBACK}][/a]


well.. what hotness gives is more of a measure of recentness of play with a decay rate that is slower with a higher playcount and rating i believe it is. but it is probably what the guy is talking about... and topdownjimmy (the man who has done all the gruntwork on hotness) would be able to explain it better than i.
Title: Play Counter
Post by: kl33per on 2005-07-02 14:35:59
That is why I said similar.  As far as the legwork with tagz is concerned, it'll be pretty similar to what hotness does (although not as sophisticated).
Title: Play Counter
Post by: topdownjimmy on 2005-07-02 15:00:42
Quote
I don't want change tag manualy, but I want automaticaly change %rating% when change play_counter in this nice plugin.
[a href="index.php?act=findpost&pid=310299"][{POST_SNAPBACK}][/a]

Instead of using %rating%, just use this string:

Code: [Select]
$puts(r1,5)
$puts(r2,10)
$puts(r3,15)
$puts(r4,20)
$puts(r5,25)
autorating=$ifgreater(%play_counter%,r5,5,$ifgreater(%play_counter%,r4,4,$ifgreater(%play_counter%,r3,3,$ifgreater(%play_counter%,r2,2,$ifgreater(%play_counter%,r1,1,0)))))

This is the only "manual" thing you'll have to do to get what you want.  Put this in the globals section of the Columns UI preferences and you can use %_autorating% to get this automatic rating.
Title: Play Counter
Post by: jesusxl on 2005-07-04 17:15:56
INFO (foo_uie_albumlist) : Could not find or message foo_uie_albumart.
WARNING (foo_playcount) : SQL logic error or missing database
WARNING (foo_playcount) : database is full
WARNING (foo_playcount) : database is full

What now :S
Title: Play Counter
Post by: kl33per on 2005-07-05 02:29:35
Beats me.

More information?
Title: Play Counter
Post by: Farinhir on 2005-07-05 09:45:05
Quote
WARNING (foo_playcount) : SQL logic error or missing database

What now :S
[a href="index.php?act=findpost&pid=310938"][{POST_SNAPBACK}][/a]


are you using the SQL version that kode has made?
Title: Play Counter
Post by: FofR on 2005-08-07 17:43:54
Is there a working non-tag updating version of this? My mp3s have id3 album art in them for use with an iPod picture. Whenever a song plays it consequently removes this art.
Title: Play Counter
Post by: topdownjimmy on 2005-08-07 18:49:26
Quote
Is there a working non-tag updating version of this? My mp3s have id3 album art in them for use with an iPod picture. Whenever a song plays it consequently removes this art.
[a href="index.php?act=findpost&pid=318422"][{POST_SNAPBACK}][/a]

In order to prevent this you have to block all tag update operations universally in foobar.  This of course prevents you from editing the tags with foobar, but it sounds like you don't do this anyway because you have album art stored.
Title: Play Counter
Post by: germanjulian on 2005-08-18 19:21:50
Code: [Select]
WARNING (CORE) : file info update failure on : file://M:\Music\Mp3\Albums\The White Stripes\08 - The White Stripes - Its True That We Love One Anot - Elephant.mp3
INFO (foo_playcount) : Error writing DB/file info.
INFO (CORE) : opening file for playback :
INFO (CORE) : location: "file://M:\Music\Mp3\Albums\The White Stripes\09 - The White Stripes - Little Acorns - Elephant.mp3" (0)
INFO (CORE) : attempting to edit file info : file://M:\Music\Mp3\Albums\The White Stripes\09 - The White Stripes - Little Acorns - Elephant.mp3
WARNING (CORE) : file info update failure on : file://M:\Music\Mp3\Albums\The White Stripes\09 - The White Stripes - Little Acorns - Elephant.mp3
INFO (foo_playcount) : Error writing DB/file info.


and so on... odd thing is that the play count does get incremented... this happens with songs with 0 songs played or more...

beats me... has been happening since a week now. havent changed anything in foobar for 4 weeks now.

any ideals?
Title: Play Counter
Post by: kl33per on 2005-08-19 03:37:21
Something has changed.  Does manual tag updating work?
Title: Play Counter
Post by: krazy on 2005-09-11 14:50:51
Quote
Current Goals for Next Version:
- Massive UI update (including more detailed info on all the features)
- Post so I can add more!!

Completed Goals:
- Fix bug in "Immediately Update Songs after X Seconds"
- Finalise PLAY_STAMP format.  PLAY_STAMP now records a complete play history including the FIRST_PLAYED andLAST_PLAYED stamps.
[a href="index.php?act=findpost&pid=306775"][{POST_SNAPBACK}][/a]

For those of us who would like to keep a check on the size of tags, would it be possible to set a maximum size to the PLAY_STAMP field? For example I could set PLAY_STAMP to have only 3 entries with information on the last three plays.
Title: Play Counter
Post by: BaStar on 2005-09-29 14:47:18
I have read all post and still dont know how to make play counter work :/ maybe anyone can make a small tutorial how to make it work.

Thx for help
Title: Play Counter
Post by: Storm on 2005-09-29 23:33:26
Is anyone working on this plugin? Will it be updated to be 0.9 compatible when the SDK comes out? Hope it will, it's great. So simple, but really great.
Title: Play Counter
Post by: chowe on 2005-09-30 01:33:48
@ BAstar
This only works in v.8.3 (i think)
Its pretty simple to use, download the file from the first post (binary) place it in your components folder, then restart foobar. After that you'l see a 'play count' option listed under components in the  preferences window. You can set when u want it to update ur file (the slider) and other stuff. The playcount tag it adds is:
%play_counter% (number of times played)
%play_date% (last date it was played)
%play_time% (last time it was played)

"This post has been edited by tboehrer: Apr 14 2004, 06:00 AM"
Judging by this i doubt anyone is developing this plugin, unless tboehrer starts usin .9.... i guess the source is there if anyone wants to try.
Title: Play Counter
Post by: Lyx on 2005-09-30 03:24:27
<anti-bullshit-mode>
kl33per is probably still "developing" the plugin. There is just no plugin for 0.9 because there is no public SDK <blahblah> SDK will be released when fb2k 0.9 goes final <blahblah> which will be when its done.

Besides, the plugin in the first post together with its tag-scheme is now considered obsolete and was inofficially replaced by kl33pers new version. Thus, whoever downloads the plugin in the first post and tags his/her files with it will find them incompatible with the new plugin when 0.9 comes out and kl33per updates his plugin.
</anti-bullshit-mode>
Title: Play Counter
Post by: chowe on 2005-09-30 22:25:48
lol sorry i haven't been keepin up to date, didnt realise kl33per was developing it.
my previous post should probably say:
"Judging by this i doubt [tboehrer] is developing this plugin"
Thanks for the heads up lyx
(I'm still usin .8 atm, so personally im glad there isnt an sdk out yet hehe )
is this: foo_playcount 1.7.8 *TEST VERSION* (May 18 2005) the latest version so far?
edit: cant seem to access the file..
Title: Play Counter
Post by: Lyx on 2005-10-01 10:24:21
kl33pers playcount is also available at the 3rd-party plugin-site (check "must know sites for fb2k" in the general-subforum if you dont have the link to it).
Title: Play Counter
Post by: topdownjimmy on 2005-10-01 16:42:18
Quote
For those of us who would like to keep a check on the size of tags, would it be possible to set a maximum size to the PLAY_STAMP field? For example I could set PLAY_STAMP to have only 3 entries with information on the last three plays.
[a href="index.php?act=findpost&pid=326282"][{POST_SNAPBACK}][/a]

i think that's a great idea
Title: Play Counter
Post by: kl33per on 2005-10-02 01:21:12
Alright to address everyone's comments...

Somebody (BaStar actually) asked about a tutorial.  That's what I've been working on and why there hasn't been a release in a while.  Unfortunately I've also become busy with other projects and real life.  However I'm committed to keeping this plugin going.  When the 0.9 SDK is out, I'll port it to 0.9.

As to the limiting the number of play_stamp's thing.  I need more convincing.  The play_stamp field is designed as a complete playback history.  Limiting it to the last 'x' plays changes it's purpose pretty drastically.

BTW, when I've done a 0.9 version, I'll start a new thread and the first post will always be kept up to date with the latest version.

The third party plugins site is http://pelit.koillismaa.fi/plugins/ (http://pelit.koillismaa.fi/plugins/).  The latest version is always available there.  The site seems to be down at the moment though.
Title: Play Counter
Post by: krazy on 2005-10-03 02:46:30
The limit to the size of the play_stamp tag would be an option, so that if you really wanted a complete history you could have it. I just really hate tag bloat and was looking for a way to limit metadata to a sane amount in the absense of an external database.

Great to hear foo_playcount will be appearing in 0.9!
Title: Play Counter
Post by: kl33per on 2005-10-03 03:27:12
topdownjimmy, how will this affect the new version of hotness?

If it doesn't adversly affect the algorithm, I'll implement the feature and release a new version (finally).
Title: Play Counter
Post by: topdownjimmy on 2005-10-03 12:17:29
Quote
topdownjimmy, how will this affect the new version of hotness?

If it doesn't adversly affect the algorithm, I'll implement the feature and release a new version (finally).
[a href="index.php?act=findpost&pid=331169"][{POST_SNAPBACK}][/a]

all it will mean is that people who set that history limiting option will have to use the old version of hotness, which doesn't rely on play_stamps.
Title: Play Counter
Post by: kl33per on 2005-10-03 13:13:20
So having a limited number of play_stamp's will break the new hotness? Can the new algorithm be modified to take into account a set number of play_stamps and use the average time between each stamp to calculate the hotness? Or is the new hotness algorithm much more advanced than that?
Title: Play Counter
Post by: gboy515duo on 2005-10-22 19:43:26
Is there any way you can have it say the percentage of plays?

IE: If a song has 10 plays and foobar has played 200 songs ever, what would the could be?
Is there a tag/component i can add to count all songs as a general tag to the dB?
Title: Play Counter
Post by: RedFox on 2005-10-22 21:22:42
Quote
Is there any way you can have it say the percentage of plays?

IE: If a song has 10 plays and foobar has played 200 songs ever, what would the could be?
Is there a tag/component i can add to count all songs as a general tag to the dB?
[{POST_SNAPBACK}][/a] (http://index.php?act=findpost&pid=336580")

I guess the total number of songs played would not be in the DB, because it's not related to a file in particular.
It would be possible to get that value by processing the whole DB and adding all PLAY_COUNT values. Maybe you could do that with foo_lua.

Not exactly what you asked for, but if you like charts, you can check the audioscrobbler plugin, which will allow you to check your personal charts on [a href="http://www.last.fm/tour.php]last.fm[/url] site, get recommendations and share with the community.
The plugin is available here (http://www.last.fm/postsignup.php).
If you want to go through a proxy, AFAIK this version (http://www.last.fm/forum/25/_/17668) works better.
Title: Play Counter
Post by: gboy515duo on 2005-10-23 05:11:37
Yeah. I use last.FM/audiocrobbler already. I'm just looking for like ... current stats up to the second shite and whatever.... anyway i'll check out foo_lua.

Is it possible to have foo_lua run every night at lets say 2 AM to add up the playcount values so i have it for the day?
Title: Play Counter
Post by: InFlame on 2005-11-27 23:16:28
how can i get a date format like this:
28.11.05
dd.mm.yy

and separate 

00:15 Uhr
mm:hh Uhr

my current code:
$get(spacer2)$get(info)Zuletz gespielt: $get(text)$if(%LAST_PLAYED%,%LAST_PLAYED%,'nie')$char(10)

would be great if you could help me!!
tia
Title: Play Counter
Post by: Lyx on 2005-11-28 00:42:12
check out the codesnippets in the first post in this thread - among other things, they also tell you how to split up the timestamp into year, month, day, hour, min, sec...... afterwards, you can reformat it as you like:

http://www.hydrogenaudio.org/forums/index....showtopic=31530 (http://www.hydrogenaudio.org/forums/index.php?showtopic=31530)
Title: Play Counter
Post by: InFlame on 2005-11-28 08:20:20
Quote
check out the codesnippets in the first post in this thread - among other things, they also tell you how to split up the timestamp into year, month, day, hour, min, sec...... afterwards, you can reformat it as you like:

http://www.hydrogenaudio.org/forums/index....showtopic=31530 (http://www.hydrogenaudio.org/forums/index.php?showtopic=31530)
[a href="index.php?act=findpost&pid=345782"][{POST_SNAPBACK}][/a]

thanks, i will try it....
Title: Play Counter
Post by: ArcticRSXS on 2005-12-10 22:33:19
I dont know how to get the time and date to show up....it just comes up as "Last Played: ? on ?"

anyhelp

---edit---

never mind...i figured it out.
Title: Play Counter
Post by: pIv on 2005-12-19 09:51:27
I try new beta foo_playcount for Foobar 9b13.

This is very bad release. All old statistics is lost, also tag first_played not supported.

I don't  convert play_counter to play_count by using tags operation avalable with right mouse click.

Now I wait release from author of plugin.
Title: Play Counter
Post by: foosion on 2005-12-19 11:08:53
The playcount component offered on the beta page has nothing to do with any that was made for 0.8.3. The new one was made by zZzZzZz. While it may be sufficient for some users, it was only intended as a test for a new API that allows components to add titleformatting fields and functions to arbitrary tracks. For example it does not import playback statistics stored in any form - including those used by the playcount component(s) for 0.8.3. If you require a full-featured playcount component, I suggest you wait for someone to create one when the 0.9 SDK is released, i.e. when 0.9 goes final.

Quote
<DEATH> bah. no playcount == whining. playcount implementation == more whining.
...
<DEATH> i added the API and that's as far as my interest in adding this goes
<DEATH> and even wrote test implementation to make sure that it actually works
This was from a discussion on the foobar2000 IRC channel yesterday. Note: DEATH = zZzZzZz = foobar2000 author.
Title: Play Counter
Post by: hunted on 2005-12-19 11:26:57
yay! thank you Peter (and foosion), I appreciate the work into the API.  This is the only feature I really wanted in 0.9, this will help all sorts of plugins (ipod, playcount, etc...)
Title: Play Counter
Post by: josephyang on 2005-12-28 12:31:36
I have no idea how to use this plugin even though I read many articles
Sorry about that...

I want to display play count info on trackinfo panel
I have foo_playcount Version 1.7.6 and foo_ui_columns.dll

What should I do next? 

In my thought...I should input something on prefereces windwos like Appended Information and Track Info Panel...

Please help me...Any tip would be appreciated...
Title: Play Counter
Post by: Lyx on 2005-12-28 17:04:04
There are two ways to do it:

1. find a trackinfo config from someone else which already has playback-stats display included.

2. Do it yourself: http://www.hydrogenaudio.org/forums/index....showtopic=31530 (http://www.hydrogenaudio.org/forums/index.php?showtopic=31530) <-- the tags %first_played% and %last_played% and their coresponding codesnippets are interesting there. For counting the number of plays, the field %play_counter% is used.
Title: Play Counter
Post by: josephyang on 2005-12-29 05:07:25
Thanks for the help 
I got a trackinfo code...and then should I mod file's tags manually?

For example, If I want to display the last played info...should I add LAST_PLAYED for tag fieldname and put %last_played% for field value?

And how to use "Code snippets" ?

Really sorry about low level questions...
Title: Play Counter
Post by: Lyx on 2005-12-29 05:51:56
Quote
Thanks for the help  
I got a trackinfo code...and then should I mod file's tags manually?

For example, If I want to display the last played info...should I add LAST_PLAYED for tag fieldname and put %last_played% for field value?

The playcount plugin will automatically add those tags to your files. Thats basically the point of what the plugin does. You dont need to do this yourself - it happens automatically when you play files.

Quote
And how to use "Code snippets" ?

Well, it works like this...

If you want to display how often a track has been played somewhere:
(no matter if in a playlist, trackinfo-panel, etc. - it works the same everywhere)
Then just put %play_counter% there.

If you want to display last/first played info of a track:
Just put %last_played% or %first_played% there.

If you only want to display the date of last/first played info:
Just put $left(%last_played%,10) or $left(%first_played%,10) there.


Now, as for "where" this has to be entered - i dont know because i dont use the trackinfo-panel yet. I guess somewhere in the trackinfo-preferences there should be a location where one can enter a "formatting string" - thats where you need to put it. Someone else will need to help out here

- Lyx

@kl33per: the first post of this thread still points to the obsolete version of this plugin. Maybe it would make sense if you would start a new thread, so that this one gets faded out?
Title: Play Counter
Post by: josephyang on 2005-12-29 11:11:15
I really appreciate your kind explanation 

As you told, all I need to do is just put Code snippets on trackinfo panel
For example...like this one...

// display only the time of last_played (without reformatting)
// the use of $right is strongly unrecommended!
$substr(%last_played%,12,19)

Am I right?  Sorry for inconvenience...
Title: Play Counter
Post by: Lyx on 2005-12-29 11:37:33
Yep, just as you said :) In the area where you can put code, the *order* matters.

Example1:
Code: [Select]
%artist%' - '%title%' was played last time on '%last_played%


Example2:
Code: [Select]
'On '%last_played%', '%artist%' - '%title%' was played the last time'


So, everything entered in the area where you can paste code, is executed(and displayed) from left->right, top->bottom.
Title: Play Counter
Post by: josephyang on 2005-12-29 12:55:33
Again...sorry...

I put this on trackinfo panel

------------------------------------------------------------
This song was played %play_counter% times so far
------------------------------------------------------------

And then it displays

------------------------------------------------------------
This song was played ? times so far
------------------------------------------------------------

What did I wrong? I use Tahoma 8pt...
Title: Play Counter
Post by: Lyx on 2005-12-29 13:02:02
It will display "?" if the track does not have the specified tag. Just interprete ? as "error, tag not found".

To avoid this, use [ ] brackets - like this:
test [blah %last_played%]

Everything inside the brackets will only be displayed if the %tag% inside of the brackets does exist.

another useful function is $if - syntax goes like this:
$if(this_condition_is_true,then_do_this,else_do_this)

Example:
$if(%play_counter%,this track was played %play_counter% times,this track was not played yet)

For more info on how this language, called TAGZ works, see these links:
http://wiki.hydrogenaudio.org/index.php?ti...at_Introduction (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Titleformat_Introduction)
http://wiki.hydrogenaudio.org/index.php?ti...ormat_Reference (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Titleformat_Reference) (important: the "field remappings" described there work differently in foobar 0.8)
Title: Play Counter
Post by: Olive on 2005-12-29 13:17:00
You can use $if2 if you want something to be displayed when %tag% doesn't exist, for example:
$if2(This song has been played %play_counter% times so far, This song has not been played yet)$char(10)
In order to avoid mistakes like "played 1 times" I'm using:
// play counter
$if(%play_counter%
,
$if($strcmp(%play_counter%,1),Played once,
$if($strcmp(%play_counter%,2),Played twice,
Played %play_counter% times))
,
Never played)$char(10)
Title: Play Counter
Post by: josephyang on 2005-12-29 13:18:32
I put this : 

test[blah %play_counter%] and then it displays just "test"

I think my play_count plugin doesn't work normally
When I open Properties windows...there is no PLAY_COUNTER or LAST_PLAYED
Just there are TITLE, ARTIST, ALBUM...etc

I checked all on Tag Writing option and leave blank on Appended Infomation under play count preference
Title: Play Counter
Post by: Lyx on 2005-12-29 13:19:06
Quote
You can use $if2 if you want something to be displayed when %tag% doesn't exist, for example:
$if2(This song has been played %play_counter% times so far, This song has not been played yet)$char(10)
[a href="index.php?act=findpost&pid=353052"][{POST_SNAPBACK}][/a]

wow, something which i didn't know yet - thanks! Is this new in 0.9 or does it also work in 0.8?
Title: Play Counter
Post by: Olive on 2005-12-29 13:23:31
heheh yes it seems to work in 0.8.3
Title: Play Counter
Post by: Lyx on 2005-12-29 13:29:16
Quote
I think my play_count plugin doesn't work normally
When I open Properties windows...there is no PLAY_COUNTER or LAST_PLAYED
Just there are TITLE, ARTIST, ALBUM...etc
[a href="index.php?act=findpost&pid=353053"][{POST_SNAPBACK}][/a]

Did you play those tracks completely, or just gave them a short "quick-play"? In the prefs, there is a slider "update songs when playback percentage is..." - if for example it is set to 75%, then it will only add playcount-tags to a song, after you've listened 3/4 through it.

- Lyx
Title: Play Counter
Post by: Shade[ST] on 2005-12-31 17:58:52
Is the current implementation of %play_count% (with plugin) configurable?  - It seems to add 1 to the play count as soon as a tune starts playing.  Is there any way I can, maybe, install another plugin to change this functionnality somewhat?  How did the previous plugin work?

Thanks,
Tristan.
Title: Play Counter
Post by: kockroach on 2005-12-31 18:27:03
This pertains to fb2k 0.83.  The foo_playcount plugin from this thread (most recently improved by kl33per) has a slider that allows you to change when the tags are updated.  It is defaulted to 50%.  There is also an option that will immediately update songs if they are shorter than a specified number of seconds (if set to 0, then this function is ignored).

If you are using fb2k 0.9, then this is not the same foo_playcount.
Title: Play Counter
Post by: JaxeN on 2006-01-07 04:53:34
link dead. anyone got a mirror to the latest version?
Title: Play Counter
Post by: sauce on 2006-01-10 06:18:37
i'm also looking for a copy.  i will temporarily host it if anyone can kindly send to sauce</at>notamused</dot>org

thanks
Title: Play Counter
Post by: kockroach on 2006-01-12 04:48:54
It is at the 3rd party website.....try this download link. (http://pelit.koillismaa.fi/plugins/redir.php?id=535)
Title: Play Counter
Post by: YhawK on 2006-02-14 22:30:07
Hey the Plugin on the Beta Site for 0.9 Beta 14 doesn't work for me, it just doesnt count. What's wrong?
Title: Play Counter
Post by: kockroach on 2006-02-14 22:34:45
It isn't the same thing as the plugin in this thread.
Title: Play Counter
Post by: helig on 2006-03-16 08:06:48
Quote
foo_playcount 1.7.8 *TEST VERSION* (May 18 2005) (http://users.tpg.com.au/adsll926/foobar/foo_playcount_test.rar)

1) Changed PLAY_STAMP so that it writes each stamp to the same field seperated by a ";" character.

@ above, no worries, was just a little concerned + I've had a bad day, so I may have come off a little harsh, sorry.

Edit: Have removed PLAY_STAMP from the available stable 1.7.6 version so that users who get it from the plugins site will get only the stable features.
[a href="index.php?act=findpost&pid=298518"][{POST_SNAPBACK}][/a]


is this the latest version or is there a newer somewere else?

edit: nevermind.. didn't read the most recent posts so well
Title: Play Counter
Post by: Generalverdacht on 2006-03-23 17:51:16
sorry, could anybody tell me where to find a working version of play counter for my version 8.3 ?
Title: Play Counter
Post by: benrad on 2006-03-29 16:41:50
So are we going to see a new port for version .9?

I love me some play counter.
Title: Play Counter
Post by: randal1013 on 2006-03-29 16:52:51
yeah, play counter is an important plug-in for me. not having this plug-in for .9 is the main reason why i still primarily use .83.
Title: Play Counter
Post by: Zootropo on 2006-03-29 17:49:51
and why don't you use the playback statistics component? One of the fields is the number of times it has been played
Title: Play Counter
Post by: benrad on 2006-03-29 18:04:17
Quote
and why don't you use the playback statistics component? One of the fields is the number of times it has been played
[a href="index.php?act=findpost&pid=376742"][{POST_SNAPBACK}][/a]


Well, because I didn't know about it. Is it something built in or another plug-in?
Title: Play Counter
Post by: snively on 2006-03-29 18:43:01
Quote
and why don't you use the playback statistics component?
[a href="index.php?act=findpost&pid=376742"][{POST_SNAPBACK}][/a]



because our previous play counts are useless with their component?
Title: Play Counter
Post by: DustMagnet on 2006-03-30 03:48:59
Quote
Quote
and why don't you use the playback statistics component?
[a href="index.php?act=findpost&pid=376742"][{POST_SNAPBACK}][/a]



because our previous play counts are useless with their component?
[a href="index.php?act=findpost&pid=376763"][{POST_SNAPBACK}][/a]


I'm using this:
$add(%play_counter%,%play_count%)
to combine the two values
Title: Play Counter
Post by: hedge153 on 2006-03-30 05:35:29
Quote
Quote
Quote
and why don't you use the playback statistics component?
[a href="index.php?act=findpost&pid=376742"][{POST_SNAPBACK}][/a]



because our previous play counts are useless with their component?
[a href="index.php?act=findpost&pid=376763"][{POST_SNAPBACK}][/a]


I'm using this:
$add(%play_counter%,%play_count%)
to combine the two values
[a href="index.php?act=findpost&pid=376931"][{POST_SNAPBACK}][/a]

Yeah thats what im using, last_played doesn't want to work nice tho, it seems to automatically check for a tag called last_played present, if its there, it will use it instead of the playback stats component added one.
Title: Play Counter
Post by: amonrei on 2006-03-30 07:39:54
Quote
I'm using this:
$add(%play_counter%,%play_count%)
to combine the two values[a href="index.php?act=findpost&pid=376931"][{POST_SNAPBACK}][/a]

Thanks. This works. 
Title: Play Counter
Post by: MC Escher on 2006-03-30 12:20:13
Where does that plugin store the playback information? I can't see any tags for that, and I'ld like that info to be in tags, because it's less likely that something bad happens to all my music then one database file (and if something bad happens with all my music I have far bigger problems then lost playback info).
Title: Play Counter
Post by: Tiis on 2006-03-30 13:36:55
Quote
Quote
I'm using this:
$add(%play_counter%,%play_count%)
to combine the two values[a href="index.php?act=findpost&pid=376931"][{POST_SNAPBACK}][/a]

Thanks. This works. 
[a href="index.php?act=findpost&pid=376976"][{POST_SNAPBACK}][/a]


Where to add?
Title: Play Counter
Post by: snively on 2006-03-30 16:44:15
Quote
Quote
Quote
I'm using this:
$add(%play_counter%,%play_count%)
to combine the two values[a href="index.php?act=findpost&pid=376931"][{POST_SNAPBACK}][/a]

Thanks. This works. 
[a href="index.php?act=findpost&pid=376976"][{POST_SNAPBACK}][/a]


Where to add?
[a href="index.php?act=findpost&pid=377057"][{POST_SNAPBACK}][/a]


Columns UI / Playlist view / Columns..

either make a new column or add it to a previous one
Title: Play Counter
Post by: gob on 2006-03-31 06:07:13
i guess i wont be using 0.9 untill there is a way to copy the old statistics..
Title: Play Counter
Post by: falconfox on 2006-03-31 07:18:47
why don't you use masstagger and copy all play_counter tags to play_count tags?
Title: Play Counter
Post by: Tiis on 2006-03-31 07:29:39
Quote
Where does that plugin store the playback information? I can't see any tags for that...
[a href="index.php?act=findpost&pid=377046"][{POST_SNAPBACK}][/a]


That would be very interesting for me, too!
Title: Play Counter
Post by: unabatedshagie on 2006-03-31 08:02:04
Quote
Where does that plugin store the playback information? I can't see any tags for that, and I'ld like that info to be in tags, because it's less likely that something bad happens to all my music then one database file (and if something bad happens with all my music I have far bigger problems then lost playback info).
[a href="index.php?act=findpost&pid=377046"][{POST_SNAPBACK}][/a]



Quote
Quote
Where does that plugin store the playback information? I can't see any tags for that...
[a href="index.php?act=findpost&pid=377046"][{POST_SNAPBACK}][/a]


That would be very interesting for me, too!
[a href="index.php?act=findpost&pid=377352"][{POST_SNAPBACK}][/a]

IIRC the plugin stores the information in the foobar config file, also IIRC the plugin wasn't really intended for actual everyday use, it was created as more of a proof of concept that plugins could store info to external files.
Title: Play Counter
Post by: mixcherry on 2006-03-31 08:09:25
Quote
why don't you use masstagger and copy all play_counter tags to play_count tags?
[a href="index.php?act=findpost&pid=377348"][{POST_SNAPBACK}][/a]

New PC plugin developed by Peter stores its statistics in foobar2000.cfg, not in the database. I don't know what will happen when you masstag your _files_ with play_count tag, but I suppose you won't be too satisfied with the result
Title: Play Counter
Post by: MC Escher on 2006-03-31 10:48:53
Since the official playback statistics plugin stores the playcount information in something as corruptable as the foobar2000.cfg, I renew my request for someone to port this plugin over.
Title: Play Counter
Post by: The Link on 2006-03-31 11:02:28
Quote
... something as corruptable as the foobar2000.cfg ...[a href="index.php?act=findpost&pid=377408"][{POST_SNAPBACK}][/a]
  So you prefer an external sql database or do you want to have the playback statistics tagged to your files?
Title: Play Counter
Post by: Killmaster on 2006-03-31 11:19:28
Quote
Quote
... something as corruptable as the foobar2000.cfg ...[a href="index.php?act=findpost&pid=377408"][{POST_SNAPBACK}][/a]
  So you prefer an external sql database or do you want to have the playback statistics tagged to your files?
[a href="index.php?act=findpost&pid=377411"][{POST_SNAPBACK}][/a]


I mentioned this in another post, but I think it should store it in a file completely seperate from everything else. I also think that someone should figure out how to import the mySQL and tag-related stuff into this plugin's storage, which would be amazingly useful.
Title: Play Counter
Post by: MC Escher on 2006-03-31 16:00:21
Quote
Quote
... something as corruptable as the foobar2000.cfg ...[a href="index.php?act=findpost&pid=377408"][{POST_SNAPBACK}][/a]
  So you prefer an external sql database or do you want to have the playback statistics tagged to your files?
[a href="index.php?act=findpost&pid=377411"][{POST_SNAPBACK}][/a]

In the tags of the files.
Title: Play Counter
Post by: falconfox on 2006-03-31 17:44:43
I would like them in the tags of the files as well. Lets say that i copy my music over to my external hd or ipod, then my main hard drive crashes. Then if i recover my music from my ipod, i still have the play_count information.

It just makes sense to me that file specific information should be contained in that file. Too many wierd things can happen if it isn't.

Either way someone has to set their foot down and finalize this discrepancy between playcount tags in files vs in a database.

It would also be nice if someone could come up with a method for combining play_count and play_counter tags.
Title: Play Counter
Post by: chrisbolt on 2006-03-31 19:58:44
I also prefer them in the tags of the files because my music is on a network share so it is accessible from any computer in the house, and keeping it in the files makes the most sense for me.
Title: Play Counter
Post by: mixcherry on 2006-03-31 20:52:09
Quote
I would like them in the tags of the files as well. Lets say that i copy my music over to my external hd or ipod, then my main hard drive crashes. Then if i recover my music from my ipod, i still have the play_count information.
[a href="index.php?act=findpost&pid=377494"][{POST_SNAPBACK}][/a]

Sorry for off-topic, but if my main hard drive crashed, the last thing on earth I would care about would be my playback statistics...
Title: Play Counter
Post by: Killmaster on 2006-03-31 22:10:21
I made a seperate thread with some suggestions for a new foo_playcount:http://www.hydrogenaudio.org/forums/index.php?showtopic=42625&hl=foo_playcount

Ultimately, I think it would be to everyone's advantage to merge this with foo_quicktag, so as to allow ratings info to be stored in the same place as the playcount data.
Title: Play Counter
Post by: gob on 2006-04-01 16:36:30
Quote
I made a seperate thread with some suggestions for a new foo_playcount:http://www.hydrogenaudio.org/forums/index.php?showtopic=42625&hl=foo_playcount

Ultimately, I think it would be to everyone's advantage to merge this with foo_quicktag, so as to allow ratings info to be stored in the same place as the playcount data.
[a href="index.php?act=findpost&pid=377587"][{POST_SNAPBACK}][/a]



that would be almost perfect.. the tags stored on the files should never change. things like statistics, ratings and other metadata (at the users discretion) should be stored in a separate file, but there should be a way to retain these values when you move or rename audio files.

another thing that i find myself doing all the time, if i have an MP3 album that i like, i buy the CD, and then rip it to flac. replacing the mp3's with the new flac copy. if there is a way to get the statistics and ratings for the mp3's to merge with the flac files it would be perfect.. maybe a little bit of user interaction would be necessary.

i'm slowly learning c++. if something like this is not out, it may be one of my first projects.
Title: Play Counter
Post by: Bigears55 on 2006-04-02 15:17:09
Quote
Quote
... something as corruptable as the foobar2000.cfg ...[a href="index.php?act=findpost&pid=377408"][{POST_SNAPBACK}][/a]
:blink:  So you prefer an external sql database or do you want to have the playback statistics tagged to your files?
[a href="index.php?act=findpost&pid=377411"][{POST_SNAPBACK}][/a]


Anyone know where I can find a copy of kode54's mod of foo_playcount for .83 that uses an external SQLite database?  kod54's website no longer has any 0.83 plugins and all of Googles links are dead.
Title: Play Counter
Post by: drbeachboy on 2006-04-02 15:31:48
I have it, and I can email it to you. Either leave your email address here or send me a private message by clicking on my name at top left.
Title: Play Counter
Post by: Luckz on 2006-04-05 22:22:09
another thing that i find myself doing all the time, if i have an MP3 album that i like, i buy the CD, and then rip it to flac. replacing the mp3's with the new flac copy. if there is a way to get the statistics and ratings for the mp3's to merge with the flac files it would be perfect.. maybe a little bit of user interaction would be necessary.


Mark both albums, the old one on top. Then:
Tagging -> Copy info between files

Voila.
Title: Play Counter
Post by: francesco on 2006-04-11 15:37:51
how can i reset playcount tag?
Title: Play Counter
Post by: Generalverdacht on 2006-04-11 16:41:00
masstagger: play_count=0

should work
Title: Play Counter
Post by: gob on 2006-04-12 08:06:49

another thing that i find myself doing all the time, if i have an MP3 album that i like, i buy the CD, and then rip it to flac. replacing the mp3's with the new flac copy. if there is a way to get the statistics and ratings for the mp3's to merge with the flac files it would be perfect.. maybe a little bit of user interaction would be necessary.


Mark both albums, the old one on top. Then:
Tagging -> Copy info between files

Voila.



nice. i cant think of a better way to that.
Title: Play Counter
Post by: francesco on 2006-04-12 17:46:21
this is a great plug
why don't add this feature

this is an example
TAG 5 stars ,mp3 played x times
for example if i play a song for 50 times , it could be great that play count plug stores 5 stars in the rating tag!

is a good idea for you?
Title: Play Counter
Post by: Bl@ck_warrior on 2006-04-12 20:05:09
this is a great plug
why don't add this feature

this is an example
TAG 5 stars ,mp3 played x times
for example if i play a song for 50 times , it could be great that play count plug stores 5 stars in the rating tag!

is a good idea for you?


you don't need that you can just put some code in your colum ui for you rating, something like :

Code: [Select]
$if($greater($add(%play_count%,%play_counter%),20),?????,
$if($greater($add(%play_count%,%play_counter%),12),???? ,
$if($greater($add(%play_count%,%play_counter%),5),???,
$if($greater($add(%play_count%,%play_counter%),2),??,
$if($add(%play_count%,%play_counter%),?)
Title: Play Counter
Post by: francesco on 2006-04-14 06:24:39
yes i know but this did not tag the mp3
it would be great that the plugin automatically tag the mp3 every x played times
Title: Play Counter
Post by: DoXer on 2006-04-20 21:04:18
I use the 0.9-plugin. Everytime the plugin writes the counter to the tag, the music is interrupted for a short time and a small window pop up for a very short time.
What's wrong?
Title: Play Counter
Post by: foosion on 2006-04-20 21:19:57
Nothing, the window you see is the regular tag writing progress window. The interruption occurs because foobar2000 has to reopen the playing file when it updates tags on it.
Title: Play Counter
Post by: DoXer on 2006-04-20 21:31:00
Hm, but why is the music in 0.83 not interrupted. This version cached the data and writes after finished playing the track.
Title: Play Counter
Post by: Ono on 2006-04-21 21:43:25
Sorry if I've missed something obvious but is it possible to continue using the old play_counter in 0.9?  I don't really want to use the new play_count system.
Title: Play Counter
Post by: Punio.4 on 2006-04-25 10:08:12
Yup. That's really irritating... Any way to make it cache the data until the end of playback?
Title: Play Counter
Post by: kode54 on 2006-04-25 10:39:51
Only if you code that yourself, including a way to cache the data if the user closes the player after the play count is logged, but before the track finishes playing. Sounds like fun. :D
Title: Play Counter
Post by: Punio.4 on 2006-04-25 11:18:25
What i meant to say, is there any way to revert it to the 0.83 behaviour?
Title: Play Counter
Post by: Jimbo51 on 2006-04-25 12:11:50
What i meant to say, is there any way to revert it to the 0.83 behaviour?


Here's a link to the unofficial play counter
http://stephan.kochen.nl/proj/foo_playcoun...o_playcount.dll (http://stephan.kochen.nl/proj/foo_playcount/foo_playcount.dll)
Title: Play Counter
Post by: grindlestone on 2006-04-25 12:25:58

What i meant to say, is there any way to revert it to the 0.83 behaviour?


Here's a link to the unofficial play counter
http://stephan.kochen.nl/proj/foo_playcoun...o_playcount.dll (http://stephan.kochen.nl/proj/foo_playcount/foo_playcount.dll)


Is there info somewhere about this file? What is it? Does it behave differently?
Title: Play Counter
Post by: Jimbo51 on 2006-04-25 13:00:22


What i meant to say, is there any way to revert it to the 0.83 behaviour?


Here's a link to the unofficial play counter
http://stephan.kochen.nl/proj/foo_playcoun...o_playcount.dll (http://stephan.kochen.nl/proj/foo_playcount/foo_playcount.dll)


Is there info somewhere about this file? What is it? Does it behave differently?

It's just the original play_counter plugin, that adds the tags to the files.
Title: Play Counter
Post by: ungreatful on 2006-04-26 18:59:06
Hello. I'm really new to foobar2000 when it comes to title formatting. i dont know shit
So i've read almost all of your messages and you help people with this %play_date% and stud.

This is what i want. just so show play count of the songs.
I've got foobar2000 by default and i want the playcount next to the songlength.
I tried this plugin for 0.9 version, worked great but i can't get it to work on my 0.8.3 version.

Please just post a simple command that i can copy and paste into the Title Formatting->Playlist
Title: Play Counter
Post by: Fitret on 2006-04-28 00:43:23
I get the feeling that my play coutner isn't working properly.  In my Playlist Tree, I have a $add(%play_count%,%play_counter%) being displayed, and I tested my theory by playing a song and then letting the tree update... the displayed play count didn't increase at all.  There's an album that I've listened to at least 10 times with my latest installation of foobar 0.9, and most of the playcounts are showing up as 1.

I had the default playcount.dll for awhile, but a few hours ago I replaced it with the one on the previous page.  Am I not getting all the play count data that I need to be getting?  Is there some stored somewhere else?

Edit: My count data now seems to be updating, but since I had a playcount component before (the default for 0.9), I should have data for that period of time, which I seem to be missing.  How should I access it?
Title: Play Counter
Post by: YhawK on 2006-06-04 12:16:19
Will anything new happen to it or has development stopped?
Title: Play Counter
Post by: deliibrahim on 2006-06-05 15:50:18
Hello. I'm really new to foobar2000 when it comes to title formatting. i dont know shit
So i've read almost all of your messages and you help people with this %play_date% and stud.

This is what i want. just so show play count of the songs.
I've got foobar2000 by default and i want the playcount next to the songlength.
I tried this plugin for 0.9 version, worked great but i can't get it to work on my 0.8.3 version.

Please just post a simple command that i can copy and paste into the Title Formatting->Playlist



try: http://www.hydrogenaudio.org/forums/index....showtopic=41576 (http://www.hydrogenaudio.org/forums/index.php?showtopic=41576)

.
Title: Play Counter
Post by: Teukka on 2006-07-03 13:22:18
Is it possible write play count info to external database. i don't want to write that info to files because it messes files when i run sfv check.
Title: Play Counter
Post by: ARiel G. on 2006-07-03 20:12:34
So, u may use the official foo_playcount that write this info to the databae only.

http://www.foobar2000.com/components/foo_playcount.zip (http://www.foobar2000.com/components/foo_playcount.zip)
Title: Play Counter
Post by: BaByB0y on 2006-07-08 14:13:13
So, u may use the official foo_playcount that write this info to the databae only.

http://www.foobar2000.com/components/foo_playcount.zip (http://www.foobar2000.com/components/foo_playcount.zip)


Thanks man, it works right now
Title: Play Counter
Post by: roadtonowhere08 on 2006-07-10 08:20:32
Hi,

I have tried to use this plugin all night. I can get the last played part to work but not the total played. I am using foobar 0.9.2 and the official counter as well as Navigator_1.4.3 for the layout. Any help would be appreciated.
Title: Play Counter
Post by: Chaser on 2006-07-10 22:11:30
Look into the file preferences, in order to see, whether the played file's tag is updated? The tag used by the "official"-playcount-component is different from this one's. That's propably, why Navigator won't show it?!
Title: Play Counter
Post by: roadtonowhere08 on 2006-07-11 00:56:22
Look into the file preferences, in order to see, whether the played file's tag is updated? The tag used by the "official"-playcount-component is different from this one's. That's propably, why Navigator won't show it?!

Okay, I changed it to the counter that came with Navigator, and none of the songs are being counted.

The way I have foobar set up is a plain 0.9.2 installation with Navigator imported and arranged to show the explorer tree on the left and the columns playlist on the right (I assume that is the main screen that shows songs being played and queued). I loaded the directory with my music by the under the Media Library.

I am not very good at this as I am not good at coding but I am pretty sure I am following what I should be doing. How some of you can come up with these elaborate designs is beyond me...
Title: Play Counter
Post by: pIv on 2006-07-12 14:08:26
With new version of foobar - 9.3 beta 1, this plugin not work.

Tags play_counter and last_played  not refresh  now.

On foobar exit  I see next warning "metadb_handle leaks: 1 objects" and then "Runtime error! Program

c:\program files\foobar200.exe. R605 - pure virtual function call"
Title: Play Counter
Post by: Dr.Death on 2006-07-12 18:29:12
pIv i have the same error 8\
Title: Play Counter
Post by: Patu on 2006-08-08 14:50:18
I have problems making the last play date work in my 0.9.3. With 0.8.3 I use the following code line. How to make it work with the new %last_played%.

Code: [Select]
A0A0A0  FFFFFFLast played:A0A0A0$if(%play_date%,' '$left(%play_date%,2).$substr(%play_date%,3,4).$right(%play_date%,2)' A0A0A0atA0A0A0 '$left(%play_time%,2):$substr(%play_time%,3,4),' never played')$char(10)


Color codes make the code line look quite chaotic but I think you can read it.

It looked like this (http://www.saunalahti.fi/tuolaaks/fuubar.png) when it worked in 0.8.3.

Thanks for your help.
Title: Play Counter
Post by: unabatedshagie on 2006-08-09 08:14:10
I have problems making the last play date work in my 0.9.3. With 0.8.3 I use the following code line. How to make it work with the new %last_played%.

Code: [Select]
A0A0A0  FFFFFFLast played:A0A0A0$if(%play_date%,' '$left(%play_date%,2).$substr(%play_date%,3,4).$right(%play_date%,2)' A0A0A0atA0A0A0 '$left(%play_time%,2):$substr(%play_time%,3,4),' never played')$char(10)


Color codes make the code line look quite chaotic but I think you can read it.

It looked like this (http://www.saunalahti.fi/tuolaaks/fuubar.png) when it worked in 0.8.3.

Thanks for your help.
play_time and play_date are not used anymore, that is why it doesn't work.

The tags that are used now are first_played last_played and play_counter.

I don't know what new tag corresponds with the old tags (if the do at all)
Title: Play Counter
Post by: Patu on 2006-08-09 09:51:51
play_time and play_date are not used anymore, that is why it doesn't work.

The tags that are used now are first_played last_played and play_counter.

I don't know what new tag corresponds with the old tags (if the do at all)


Yes I know they're not used anymore.

And the play counter tag is %play_count% nowadays, not %play_counter%.

I have tried to replace play_date tags with last_played tags but it didn't work.
Title: Play Counter
Post by: unabatedshagie on 2006-08-09 13:31:32

play_time and play_date are not used anymore, that is why it doesn't work.

The tags that are used now are first_played last_played and play_counter.

I don't know what new tag corresponds with the old tags (if the do at all)


Yes I know they're not used anymore.

And the play counter tag is %play_count% nowadays, not %play_counter%.

I have tried to replace play_date tags with last_played tags but it didn't work.
Technically we are both correct about the playcount tag, the official one uses %play_count% where as the unofficial one uses %play_counter%.
Title: Play Counter
Post by: Patu on 2006-08-09 13:34:57
Technically we are both correct about the playcount tag, the official one uses %play_count% where as the unofficial one uses %play_counter%.


Yes I use the official one.

If someone knows how to make last played work properly with the official plug in then please tell me.

Thanks for the help.
Title: Play Counter
Post by: OCedHrt on 2006-08-09 17:53:37

Technically we are both correct about the playcount tag, the official one uses %play_count% where as the unofficial one uses %play_counter%.


Yes I use the official one.

If someone knows how to make last played work properly with the official plug in then please tell me.

Thanks for the help.


I won't write it out for you, but I'll give you a big hint. The current %last_played% is probably the same as %play_date% %play_time% in your script. Assuming that the date and time that you're using is in the same format as it is now, you would add 9 to each number under %play_time% and replace %play_time% and %play_date% with %last_played%.
Title: Play Counter
Post by: Earthworm on 2006-08-11 19:57:08
hi there

i've got the same problem. the counter doesn't work anymore with fb2k v.0.9.3.
is there any possibility to fix this, or do i have to change all my tags (which would be very annoying) and use the official version?

thanks 4 help
Title: Play Counter
Post by: pixx on 2006-08-11 19:59:52
just so you don't give up, the real answer to this thread is here:
http://www.hydrogenaudio.org/forums/index....=33&t=42625 (http://www.hydrogenaudio.org/forums/index.php?act=ST&f=33&t=42625)
Title: Play Counter
Post by: OCedHrt on 2006-08-11 20:18:26
hi there

i've got the same problem. the counter doesn't work anymore with fb2k v.0.9.3.
is there any possibility to fix this, or do i have to change all my tags (which would be very annoying) and use the official version?

thanks 4 help


You won't have to change your tags to use the offical version. The official play counter actually accumulates the %play_counter% tag into it's own play_count to give you a combined play count. I can only think of two reasons to use the unofficial play counter:
1. first_played tag
2. Customizability
Title: Play Counter
Post by: Earthworm on 2006-08-11 20:41:28

hi there

i've got the same problem. the counter doesn't work anymore with fb2k v.0.9.3.
is there any possibility to fix this, or do i have to change all my tags (which would be very annoying) and use the official version?

thanks 4 help


You won't have to change your tags to use the offical version. The official play counter actually accumulates the %play_counter% tag into it's own play_count to give you a combined play count. I can only think of two reasons to use the unofficial play counter:
1. first_played tag
2. Customizability


thank you both for the fast answer. i'll try the official play counter and try to find a way to display both infos in my column.

EDIT: ok, that won't be necessary  as i noticed. thanks anyway
Title: Play Counter
Post by: buckaroo on 2006-08-20 14:40:26
Today I stumbled upon a problem with playcount an ID3V2-Tags:
When playcount updates the currently played MP3 the tags Artist, Year, Genre, Track and AlbumArt are deleted
But only in the ID3V2-Tag. The informations in the ID3V1-Tag are unmodified. 
At least Tag&Rename says so. foobar of course still has all the informations stored when i click on "File info"

Update: Ok, this seems to be a problem with Tag&Rename. I just tried "MP3Tag" and it shows the "missing" informations 
Title: Play Counter
Post by: OCedHrt on 2006-08-21 05:28:06
Today I stumbled upon a problem with playcount an ID3V2-Tags:
When playcount updates the currently played MP3 the tags Artist, Year, Genre, Track and AlbumArt are deleted
But only in the ID3V2-Tag. The informations in the ID3V1-Tag are unmodified. 
At least Tag&Rename says so. foobar of course still has all the informations stored when i click on "File info"

Update: Ok, this seems to be a problem with Tag&Rename. I just tried "MP3Tag" and it shows the "missing" informations 


I simply turned off ID3V1 tags in all my mp3s  The problem is that a lot of seemingly ID3V2 tags are actually interpolated data from ID3V1 when not existing in V2, making it seem like you have ID3V2 tags.
Title: Play Counter
Post by: buckaroo on 2006-08-21 14:58:44
I simply turned off ID3V1 tags in all my mp3s


Need them for my MP3-Stick 
Title: Play Counter
Post by: ...Just Elliott on 2006-08-21 19:43:39
Uhh... all of a sudden my playcount isn't updating. I can't give any more info than that, it's just... stopped updating. Help please?
Title: Play Counter
Post by: xiaomickey on 2006-09-07 09:42:23
played %play_counter% times$char(10)
last played %first_played% $char(10)

Title: Play Counter
Post by: dev_HH on 2006-09-09 02:38:43
played %play_counter% times$char(10)
last played %first_played% $char(10)



enabling the "Automatically synchronize file tags with statistics" option helped for me.. (although it sometimes causes a little higher cpu-usage)

maybe you should have a look a the properties dialog of some song - maybe your script is using another tag than your version of the foo_playcount-plugin?!

Hope this helps!
Andreas

(http://users.informatik.haw-hamburg.de/~krohn_d/temp/foobar_playcount.jpg)
Title: Play Counter
Post by: gumbulak on 2006-09-17 16:57:51
There is a new version on the server (http://www.foobar2000.org/components/index.html).
Does anybody know what is new?

Thanx
Title: Play Counter
Post by: kockroach on 2006-09-18 02:31:09
There is a new version on the server (http://www.foobar2000.org/components/index.html).
Does anybody know what is new?

Thanx

That is not the same plugin as the one discussed in this thread.
Title: Play Counter
Post by: gumbulak on 2006-09-18 07:18:51

There is a new version on the server (http://www.foobar2000.org/components/index.html).
Does anybody know what is new?

Thanx

That is not the same plugin as the one discussed in this thread.


Sorry for doing this wrong. I will ask the question in the correct thread.
Title: Play Counter
Post by: kanak on 2006-09-25 18:33:31
@Just Elliott

hmm. not working here either. Anyone know what's wrong? maybe we should just bite the bullet and start using the official play counter or something

Edit: Found the solution. Use the updated version of the unofficial play counter.

Download dll (http://users.bowie-cass.com/singa/foo_playcount.zip)

Here's where i found the solution: HA Thread Link (http://www.hydrogenaudio.org/forums/index.php?showtopic=42625&st=125#)

Also, the metadb leaks are gone.

wohoo!
Title: Play Counter
Post by: OCedHrt on 2006-09-26 11:02:57
I've already bit the bullet and am using the official play counter  No regrets either. It's much better than it originally was.
Title: Play Counter
Post by: virus_found on 2006-09-26 12:57:09
2OCedHrt
I fully agree with you
Title: Play Counter
Post by: Sihkih on 2006-09-27 13:56:37
how can i display date but without hour?
Title: Play Counter
Post by: neooffs on 2006-09-27 14:25:42
I've already bit the bullet and am using the official play counter  No regrets either. It's much better than it originally was.

Does the official updates the tags?
Does the official work without the Media Library?
Title: Play Counter
Post by: krazy on 2006-09-27 15:18:24
Official updates tags if you set it to. Otherwise it just writes to the database.
Title: Play Counter
Post by: gob on 2006-10-15 05:03:54
is this plugin still being updated? if so, tags arent updated if foobar is restarted while a song is playing. assuming its restarted before the update should happen. and also, is ther eanyway to get rid of that damn annoying tag updating window?
Title: Play Counter
Post by: OCedHrt on 2006-10-16 22:40:06
is this plugin still being updated? if so, tags arent updated if foobar is restarted while a song is playing. assuming its restarted before the update should happen. and also, is ther eanyway to get rid of that damn annoying tag updating window?


Tags shouldn't update if foobar restarts before it should be updated. Read what you just wrote again. And yes, by using the official playback statistics instead.
Title: Play Counter
Post by: gob on 2006-11-08 04:26:56
this plugin used to leave a tmp file in foobars directory to indicate if it was playing, but not updated in the case foobar is restarted. some people have chosen foobar to resume playback on startup and in this case, the files do not get updated. also, the official plugin lacks too many options not to mention the fact that the tag it generates is useless to me..
Title: Play Counter
Post by: OCedHrt on 2006-11-08 05:44:40
this plugin used to leave a tmp file in foobars directory to indicate if it was playing, but not updated in the case foobar is restarted. some people have chosen foobar to resume playback on startup and in this case, the files do not get updated. also, the official plugin lacks too many options not to mention the fact that the tag it generates is useless to me..


Working with resume playback after restart is probably just something that was overlooked. However, the official plugin writes every tag the unofficial plugin writes.
Title: Play Counter
Post by: gob on 2006-11-08 06:07:30
ok, ive figured out that %last_played% will display a readable date format and %last_played_timestamp% shows this strange format. what format is it?

is it possible to convert all my old tags from 2006-10-15 15:30:41 to this format?
Title: Play Counter
Post by: tomthomson on 2006-11-08 22:21:05
@gob
for converting from old format (DATE) to new format (TIMESTAMP) have a look
HERE (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=46582&view=findpost&p=432195)
AND HERE (http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=46582&view=findpost&p=432500)
Title: Play Counter
Post by: gob on 2006-11-09 03:14:17
ive seen this before but the thread is in the general (fb2k) forums lol. thanks for pointing this out.
Title: Play Counter
Post by: co6 on 2007-01-01 04:08:42
Is there any way to supress the "updating files" window when it updates the playcount?? It keeps stealing focus from other programs..
Title: Play Counter
Post by: topdownjimmy on 2007-01-02 23:13:15
Is there any way to supress the "updating files" window when it updates the playcount?? It keeps stealing focus from other programs..

you can try using the official playcount plugin

http://wiki.hydrogenaudio.org/index.php?ti...oo_playcount%29 (http://wiki.hydrogenaudio.org/index.php?title=Foobar2000:Components_0.9/Play_Count_%28official%29_%28foo_playcount%29)
Title: Play Counter
Post by: Frank Bicking on 2007-01-03 17:45:06
Due to repeated crash reports during the last weeks, foo_playcount (unofficial) has been added to the list of problematic components (http://www.hydrogenaudio.org/forums/index.php?showtopic=44213).

Please refrain from recommending it (http://www.hydrogenaudio.org/forums/index.php?showtopic=30719) until these issues have been sorted out.

Users are recommended to switch to the official Playback Statistics (http://foobar2000.org/components/index.html) component instead.
Title: Play Counter
Post by: neooffs on 2007-01-03 18:23:34
the official playcount plugin doesn't have the same behavior as the unofficial does... am I wrong?
I don't want to use a database and I want it to update on the middle of the playing music...
Title: Play Counter
Post by: Lord Stealth on 2007-02-21 19:42:31
The info doesnt show up all that shows up are '?' (question marks) and I dont have the option in ADVANCED to do that stuff, anyone know whats wrong???
Title: Play Counter
Post by: Frank Black on 2007-07-24 19:24:27
(http://users.informatik.haw-hamburg.de/~krohn_d/temp/foobar_playcount.jpg)


I've recently installed the latest version of FOFR and everything seems to be working except the playcount feature. If I check the box like shown in the picture above will that cause my tags to get modified? I only want this to modify db records and not alter my tags.

Anyone have any ideas on how to troubleshoot this? I installed the playcount component that's linked at the very beginning of this thread. I'm running foobar v.0.9.4.1.

Sincerely,

FB
Title: Play Counter
Post by: kanak on 2007-07-24 19:42:19
Enabling that option means the files will be modified. that's not the option you're looking for. Were the files you tried to play in the media library?
Title: Play Counter
Post by: Frank Black on 2007-07-24 21:06:14
Enabling that option means the files will be modified. that's not the option you're looking for. Were the files you tried to play in the media library?


Yes I've played multiple files and it does not seem to be working, but I am not sure of a better way to test this other than my playlist query.

Below is an example of my query. I'm probably doing something wrong there.

(http://img125.imageshack.us/img125/1926/mostplayedqueryix6.th.png) (http://img125.imageshack.us/my.php?image=mostplayedqueryix6.png)

Please let me know of how to better toubleshoot the problem if there is nothing wrong with my query and let me know if I need to provide any more info.

Thanks,

FB
Title: Play Counter
Post by: kanak on 2007-07-24 21:35:02
Should be %play_count% not %playcount%
Title: Play Counter
Post by: Frank Black on 2007-07-25 00:31:32
Should be %play_count% not %playcount%


Hmmm.. ok. I tried "NOT %playcount% MISSING", "NOT %play_count% MISSING". "NOT play_count MISSING", and "NOT playcount MISSING"

I got the original query from here -> http://wiki.bowron.us/index.php/Example_Queries (http://wiki.bowron.us/index.php/Example_Queries)

Is there some other way I can troubleshoot? I tried putting the format as "$num(%play_count%,5) - %artist% - %title%" for one of my queries and the playcount showed as 00000 for all of them. %last_played%...

WAIT.. I think I got it! It was the query altogether. It's working like a charm now.

Thanks for your help,

FB
Title: Re: Play Counter
Post by: Romroll on 2018-02-27 15:00:25
Hello,

I know that Foobar statistic exists (foo playcount), I installed it, it's great but I don't understand how it could entirely fit my need as I have 4 computers connected on my NAS containing all my audio files.

I would like to share and synchronize the count play number of my audio files on these 4 computers. I don't want to manage 4 distincts statistic files DB (one by computer).

I guess the solution would be to set the  play counter in the meta info of a the files itself but I don't know if it's possible...

Any advice is welcome!

thank you
Title: Re: Play Counter
Post by: jazzthieve on 2018-02-27 17:58:00
You need Playback Statistics Custom (http://wiki.hydrogenaud.io/index.php?title=Foobar2000:Components_0.9/Playback_Statistics_Custom_(foo_playback_custom)).
Title: Re: Play Counter
Post by: MordredKLB on 2018-02-27 19:47:34
Hello,

I know that Foobar statistic exists (foo playcount), I installed it, it's great but I don't understand how it could entirely fit my need as I have 4 computers connected on my NAS containing all my audio files.

I would like to share and synchronize the count play number of my audio files on these 4 computers. I don't want to manage 4 distincts statistic files DB (one by computer).
I store my index_data folder (the one that contains the foo_playcount index database) in my dropbox folder, and synchronize it between all my machines. The way to do this is to copy the folder from foobar into dropbox, and then create a Junction back to the foobar folder in %appdata%. Only drawback with this approach is that you can't have multiple foobars open at the same time. Foobar only reads the index-data databases at application start up (and unless you use foo_jesus only writes them at app close). So if you play a song on computer 1, while foobar is open on computer 2, computer 2's foobar won't know about the play and when it next writes the database out to the file it will overwrite whatever computer 1 had saved.
Title: Re: Play Counter
Post by: Korwin on 2023-08-17 17:59:43
Is it possible to force the current track (or selected tracks) to be marked as listened (currently)? If the answer to this question is already present in this thread, forgive me for my inattention, and help me find it. I tried to skip the track to the end, but this does not change the count of the number of plays. It works fine only when the track is played in the usual way, without scrolling. I haven't set up my Foobar2000 add-ons for many years, and I can't immediately remember how they are set up. In Preferences / Components / Installed components / Playback Statistics 3.1.5 foo_playcount I only see About, no addon settings.