Play Counter, Play count plugin |
![]() ![]() |
Play Counter, Play count plugin |
Jan 30 2005, 12:57
Post
#176
|
|
![]() Group: Members Posts: 680 Joined: 11-July 03 From: Brno, Czech Rep. Member No.: 7705 |
QUOTE (Olive @ Jan 30 2005, 12:04 AM) 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 -) 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 ... This post has been edited by mazy: Jan 30 2005, 12:58 -------------------- info about my tag guesser script for foo_lua (preview version available):
http://www.hydrogenaudio.org/index.php?showtopic=16987 |
|
|
|
Jan 30 2005, 13:34
Post
#177
|
|
|
Group: Members Posts: 19 Joined: 28-November 03 From: France Member No.: 10086 |
|
|
|
|
Jan 30 2005, 13:55
Post
#178
|
|
![]() Group: Admin Posts: 2490 Joined: 15-December 02 Member No.: 4082 |
QUOTE (t0m @ Jan 30 2005, 05:34 AM) QUOTE (upNorth @ Jan 29 2005, 01:07 PM) Where can I find that version? I think an external database would be the best solution to the problem. *boom* 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. |
|
|
|
Jan 30 2005, 15:28
Post
#179
|
|
|
Group: Members Posts: 41 Joined: 21-July 04 Member No.: 15642 |
QUOTE (mazy @ Jan 30 2005, 10:57 PM) QUOTE (Olive @ Jan 30 2005, 12:04 AM) 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 -) 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 ... 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. |
|
|
|
Jan 30 2005, 16:23
Post
#180
|
|
|
Group: Members Posts: 808 Joined: 10-June 03 From: Zaragoza Member No.: 7113 |
QUOTE (Fishy Joe @ Jan 30 2005, 06:28 AM) 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. 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 -------------------- Iván
My Blog: http://www.ivancastell.org |
|
|
|
Feb 4 2005, 07:54
Post
#181
|
|
|
Group: Members Posts: 489 Joined: 3-January 05 Member No.: 18811 |
QUOTE (Giljorak @ Apr 14 2004, 11:58 AM) Here is the format I used, I added the time stamp to the code that tboehrer provided. CODE $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 The output looks like this at the end of my playlist: 04|13|04 @ 19:33 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 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 |
|
|
|
Feb 4 2005, 16:45
Post
#182
|
|
|
Group: Members Posts: 238 Joined: 22-February 04 Member No.: 12193 |
Here is the code I use.
CODE $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 This post has been edited by Zurman: Feb 4 2005, 16:49 |
|
|
|
Feb 5 2005, 00:29
Post
#183
|
|
|
Group: Members Posts: 489 Joined: 3-January 05 Member No.: 18811 |
QUOTE (Zurman @ Feb 5 2005, 01:45 AM) Here is the code I use. CODE $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 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 |
|
|
|
Feb 5 2005, 00:39
Post
#184
|
|
|
Group: Members Posts: 489 Joined: 3-January 05 Member No.: 18811 |
CODE $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 |
|
|
|
Feb 5 2005, 12:32
Post
#185
|
|
|
Group: Members Posts: 238 Joined: 22-February 04 Member No.: 12193 |
QUOTE (4nt1 @ Feb 4 2005, 03:29 PM) wow very nice idea indeed, are you using this in your columns or in your track info ? I use this in my track info paneli would love to be able to sort my colums by most frequently played or last played... i hope that makes sense 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 |
|
|
|
Feb 5 2005, 12:43
Post
#186
|
|
|
Group: Members Posts: 238 Joined: 22-February 04 Member No.: 12193 |
QUOTE (4nt1 @ Feb 4 2005, 03:39 PM) CODE $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 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" This post has been edited by Zurman: Feb 5 2005, 12:59 |
|
|
|
Feb 6 2005, 15:05
Post
#187
|
|
|
Group: Members Posts: 489 Joined: 3-January 05 Member No.: 18811 |
very nice indeed thankyou very much
|
|
|
|
Feb 7 2005, 12:41
Post
#188
|
|
|
Group: Banned Posts: 170 Joined: 8-July 04 Member No.: 15154 |
can anyone format this
CODE $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 |
|
|
|
Feb 8 2005, 14:20
Post
#189
|
|
![]() Group: Members Posts: 134 Joined: 11-April 04 From: South West London Member No.: 13413 |
QUOTE (aliumalik @ Feb 7 2005, 11:41 AM) can anyone format this CODE $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 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. |
|
|
|
Feb 8 2005, 15:26
Post
#190
|
|
|
Group: Banned Posts: 170 Joined: 8-July 04 Member No.: 15154 |
just noticed happens with mine too
|
|
|
|
Feb 8 2005, 16:04
Post
#191
|
|
|
Group: Members (Donating) Posts: 297 Joined: 27-February 04 Member No.: 12312 |
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 This post has been edited by Olive: Feb 8 2005, 16:08 |
|
|
|
Feb 8 2005, 20:06
Post
#192
|
|
|
Group: Members Posts: 525 Joined: 1-January 05 From: Boston Member No.: 18762 |
QUOTE (aliumalik @ Feb 7 2005, 06:41 AM) can anyone format this CODE $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 Where do the "info" and "text" variables come from? |
|
|
|
Feb 8 2005, 20:46
Post
#193
|
|
|
Group: Banned Posts: 170 Joined: 8-July 04 Member No.: 15154 |
juet formatting strings
|
|
|
|
Feb 9 2005, 17:16
Post
#194
|
|
|
Group: Banned Posts: 170 Joined: 8-July 04 Member No.: 15154 |
I think I fixed the improper display thing
CODE $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 |
|
|
|
Feb 9 2005, 17:31
Post
#195
|
|
![]() Group: Members Posts: 205 Joined: 15-March 04 Member No.: 12733 |
QUOTE (aliumalik @ Feb 9 2005, 11:16 AM) 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. This post has been edited by tboehrer: Feb 9 2005, 17:32 -------------------- Santa is very jolly because he knows where all the bad girls live. - Dennis Miller
|
|
|
|
Feb 9 2005, 17:58
Post
#196
|
|
|
Group: Banned Posts: 170 Joined: 8-July 04 Member No.: 15154 |
Has someone done the AM/PM thing using %play_time% couldnt find in this thread
|
|
|
|
Feb 10 2005, 16:27
Post
#197
|
|
![]() Group: Members Posts: 491 Joined: 3-June 03 Member No.: 6981 |
This is a section of the code I use in my Track Info panel:
CODE $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 |
|
|
|
Feb 10 2005, 19:37
Post
#198
|
|
|
Group: Banned Posts: 170 Joined: 8-July 04 Member No.: 15154 |
thanks a lot crazy
|
|
|
|
Feb 17 2005, 01:01
Post
#199
|
|
![]() Group: Members Posts: 3353 Joined: 6-July 03 From: Sachsen (DE) Member No.: 7609 |
tboehrer:
please give this thread a read and drop in your opinion: http://www.hydrogenaudio.org/forums/index....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 -------------------- I am arrogant and I can afford it because I deliver.
|
|
|
|
Feb 21 2005, 03:28
Post
#200
|
|
![]() Group: Members (Donating) Posts: 713 Joined: 8-July 04 From: Sao Paulo Member No.: 15173 |
QUOTE (kode54 @ Jan 30 2005, 09:55 AM) QUOTE (t0m @ Jan 30 2005, 05:34 AM) QUOTE (upNorth @ Jan 29 2005, 01:07 PM) Where can I find that version? I think an external database would be the best solution to the problem. *boom* 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. 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: please, any guidance would be appreciated. -------------------- http://volutabro.blogspot.com
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 22nd November 2009 - 09:50 |