Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Play Counter (Read 341820 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Play Counter

Reply #225
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%)

Play Counter

Reply #226
jkwarras asked me to take a look at Kode54's version of foo_playcount to see if I could make my foo_pod 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 (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.

Play Counter

Reply #227
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

Play Counter

Reply #228
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....

Play Counter

Reply #229
Quote
Quote
Apparently, it is. Either update the server, or use SQLite.
[{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.
[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

Play Counter

Reply #230
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.

Play Counter

Reply #231
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!


Play Counter

Reply #233
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.
Surf's Up!
"Columnated Ruins Domino"

Play Counter

Reply #234
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.

Play Counter

Reply #235
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.
Surf's Up!
"Columnated Ruins Domino"

Play Counter

Reply #236
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.

Play Counter

Reply #237
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.
Surf's Up!
"Columnated Ruins Domino"

Play Counter

Reply #238
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!!

Play Counter

Reply #239
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.

God Bless U.S.A

Play Counter

Reply #240
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....
God Bless U.S.A

Play Counter

Reply #241
Quote
And I am getting this error when shutting down foobar.

Appears to be random atm.


[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?

Play Counter

Reply #242
I get this error all the time, but apparently nothing is being lost/impacted so I just don't pay attention.

Play Counter

Reply #243
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... 

Play Counter

Reply #244
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

Play Counter

Reply #245
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)

If you have any feature requests, I'm willing to (attempt) to implement them.


Play Counter

Reply #247
Quote
foo_playcount 1.5.2 (Source & Binary Included)

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.

Play Counter

Reply #248
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.

Play Counter

Reply #249
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.