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 339727 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Play Counter

Reply #200
Apparently, it is. Either update the server, or use SQLite.

Play Counter

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

Play Counter

Reply #202
Can't make it work with SQLite either... I always get this 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.

Play Counter

Reply #203
@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

Play Counter

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


Play Counter

Reply #206
Yeah, sorry, maybe I should include a readme.

Play Counter

Reply #207
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 thisthis?
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.

Play Counter

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

Play Counter

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


Play Counter

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

 

Play Counter

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

Play Counter

Reply #213
@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 

Play Counter

Reply #214
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?

Play Counter

Reply #215
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?

Play Counter

Reply #216
Quote
PLAY_STAMP = 2005-12-T$H:$M:$S$T

It recognizes year and month, but nothing else.
[{POST_SNAPBACK}][/a]

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 threadthread, 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

Play Counter

Reply #217
Quote
this sql plugin sounds great. if only there was a way to get the ratings into it.
[{POST_SNAPBACK}][/a]

I hope that some developper will get interested in implementing [a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=31803]my request[/url] 

Play Counter

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

Play Counter

Reply #219
Quote
So I guess it's not possible....  [a href="index.php?act=findpost&pid=276947"][{POST_SNAPBACK}][/a]
Correct.

Play Counter

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

Play Counter

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

Play Counter

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

Play Counter

Reply #223
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.
I am arrogant and I can afford it because I deliver.

Play Counter

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