Help - Search - Members - Calendar
Full Version: REQ: Help with Play Stats not showing...
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
Nalco
I am about 45 mins into Foobar, and know nothing at this point.

I found a post by Habla that had his code for the trackinfo dll.

I inserted the code, and it works perfectly except the fact that it doesn't display my play stats. There is obviously some error on my part, as it works perfectly for him. I was just wondering if anyone had any ideas.

Thanks!!

IPB Image


CODE
// Original code by necropimp, then modified by AstreaEdge, and again by KockRoach
// Habla likes things his way, and modified it more.
// Best viewed with vert pad 10, hor pad 8, line space 3, Calibri 8pt bold font, black

background
// lots of info needs lots of space 8)

// !!!!BEGIN USER CONFIGURATION!!!!

// Show Artist? (1 = show, 0 = don't show)
$puts(arts,1)

// Show Album?
$puts(albs,1)

// Show Title?
$puts(tils,1)

// Info Heading Color e.g. "Title:"
$puts(head,c9c9c9)

// Info Color, e.g. "Black Dog"
$puts(info,FFFFFF)

// Info Annotation Color (e.g. "kbps" is the annotation)
$puts(anno,FFFFFF)

// Separator
$puts(text2,FFFFFF)
$puts(text1,0000FF)
$puts(fadeend,000000)
$puts(seplen,53)
$puts(sepchar,'-')

////////////////////////////////////////////////
////!!!END USER CONFIGURATION!!////
//////////////////////////////////////////////

// Day Conversion
$puts(day,$substr(%last_played%,9,10))
$if(%last_played%,
$if($strcmp($left($get(day),1),0),$puts(day,$right($get(day),1))))
$if($strcmp($get(day),11),$puts(xx,th),
$if($strcmp($get(day),12),$puts(xx,th),
$if($strcmp($get(day),13),$puts(xx,th),
$if($strcmp($right($get(day),1),1),$puts(xx,st),
$if($strcmp($right($get(day),1),2),$puts(xx,nd),
$if($strcmp($right($get(day),1),3),$puts(xx,rd),
$puts(xx,th)))))))

// Month Conversion
$puts(month,$substr(%last_played%,6,7))
$puts(month_name,$select($get(month),
Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec))

// Year Conversion
$puts(year,$substr(%last_played%,1,4))

// Time Conversion
$puts(hour,$substr(%last_played%,12,13))
$puts(min,$substr(%last_played%,14,16))
$puts(sec,$substr(%last_played%,17,19))

// 24 Hour to 12 Hour Conversion
$if($strcmp($left($get(hour),1),0),$puts(hour1,$right($get(hour),1)))
$if($strcmp($left($get(hour),1),1),$puts(hour1,$sub($get(hour),12)))
$if($strcmp($left($get(hour),1),2),$puts(hour1,$sub($get(hour),12)))
$if($strcmp($get(hour),00),$puts(hour1,12))
$if($strcmp($get(hour),10),$puts(hour1,10))
$if($strcmp($get(hour),11),$puts(hour1,11))
$if($strcmp($get(hour),12),$puts(hour1,12))

// AM/PM Conversion
$if($strcmp($get(hour),00),$puts(yy,am))
$if($strcmp($get(hour),10),$puts(yy,am))
$if($strcmp($get(hour),11),$puts(yy,am))
$if($strcmp($get(hour),12),$puts(yy,pm))
$if($strcmp($get(hour),24),$puts(yy,am))
$if($strcmp($left($get(hour),1),0),$puts(yy,am))
$if($strcmp($left($get(hour),1),1),$puts(yy,pm))
$if($strcmp($left($get(hour),1),2),$puts(yy,pm))

// Date Format
$puts(time_of_year,$get(month_name) $get(day)$get(xx)',' $get(year))

// Time Format
$puts(time_of_day,$get(hour1)$get(min)$get(sec) $get(yy))

// SONG INFO SEPARATOR
$transition($repeat($get(sepchar),$get(seplen)),$get(fadeend),$get(text1))$get(text1)'['

$get(text2)S o n g I n f o $get(text1)']'$char(10)

$if($strcmp(1,$get(arts)),$if(%artist%,$get(head)Artist: $get(info)%artist%$char(10),),)
$if($strcmp(1,$get(albs)),$if(%album%,$get(head)Album: $get(info)$cut(%album%,37)
$ifgreater($len(%album%),37,'...',)$char(10),),)
$if($strcmp(1,$get(tils)),$if(%title%,$get(head)Title:

$if(%title%,$get(info)$cut(%title%,45)
$ifgreater($len(%title%),45,'...',))$char(10),$get(info)%_filename%$char(10)),)
$if(%tracknumber%,$get(head)Track #: $get(info)%tracknumber%$char(10),)
$if(%date%,$get(head)Date: $get(info)%date%$char(10),)
$if(%genre%,$get(head)Genre: $get(info)%genre%$char(10),)

// TECH INFO SEPARATOR
$transition($repeat($get(sepchar),$get(seplen)),$get(fadeend),$get(text1))$get(text1)'['

$get(text2)T e c h I n f o $get(text1)']'$char(10)

$get(head)Length: $get(info)$if(%_isplaying%,%_time_elapsed%$get(anno)$if(%_length%, /

%_length%,)$if(%_time_elapsed%, /

$muldiv(%_time_elapsed_seconds%,100,%_length_seconds%)'%')$if(%_length%, /

-%_time_remaining%),%_length%)$char(10)
$get(head)Quality: $if(%__codec%, $get(info)%__codec%) $get(info)
$if2(%__bitrate_dynamic%,%__bitrate%) $get(anno)Kb/s

$if($stricmp(%__codec%,mp3),$if($stricmp(%__extrainfo%,vbr),VBR,CBR))
$char(10)
$if(%__lame_version%,$get(head)Encoder: $get(info)$left(%__lame_version%,4)

$right(%__lame_version%,4) [$upper(%__lame_profile%)]$char(10),)
$if(%__flac_vendor%,$get(head)Encoder: $get(info)$if($stricmp(%__flac_vendor%,reference

libFLAC 1.1.2 20050205),FLAC 1.1.2 -8)$char(10),)
$if(%__mpc_profile%,$get(head)MPC Profile: $get(info)%__mpc_profile%$char(10),)
$get(head)Compression:

$get(info)$div(1411,%__bitrate%).$substr($muldiv(1411,100,%__bitrate%),2,3):1

'('$get(info)$muldiv(%__bitrate%,100,1411)$get(anno)'% of original quality)'$char(10)
$get(head)Channel Mode:

$get(info)$if($stricmp($codec(),MP3),$get(space2)$caps(%__mp3_stereo_mode%),
$if(%__channels%,$ifgreater(%__channels%,1,Stereo,Mono),'?'))$char(10)
$if(%__bitspersample%,$get(head)Bitdepth: $get(info)%__bitspersample% bits/sample$char(10),)
$if(%__samplerate%,$get(head)Samplerate:

$get(info)$div(%__samplerate%,1000).$substr(%__samplerate%,3,3) KHz $char(10))
$if(%_filesize%,$get(head)Filesize: $get(info)
$div(%_filesize%,1048576).$left($num($muldiv($mod(%_filesize%,1048576),100,1048576),2),2)

$get(anno)'MB'$char(10),)

$if(%last_played%,
// PLAY STATS SEPARATOR
$transition($repeat($get(sepchar),$get(seplen)),$get(fadeend),$get(text1))$get(text1)'['

$get(text2)P l a y S t a t s $get(text1)']'$char(10),)

$if(%play_count%,$get(head)Played $get(info)%play_count% times total$char(10),)
$if(%last_played%,$get(head)Last played on $get(info)$get(time_of_year) at

$get(time_of_day)$char(10),)
$get(head)Focus: $get(info)$if(%_trackinfo_nowplaying%,$if(%_ispaused%,Current Song

'0000FF[Paused]',Current Song),Follow Cursor$if(%_ispaused%,0000FF' [Paused]'))$char(10)
$if(%_isplaying%,$get(head)o$progress(%_time_elapsed_seconds%,

%_time_total_seconds%,72,$get(info)'::',$get(text1)'-')$get(head)o)


moderation: Please use codebox for long scripts.
crem0r
I think that your files are tagged with the "old" play_couter-plugin which uses %play_date% instead of %last_played%.

The old play_counter-plugin:
PLAY_DATE = the date last played, format DDMMYY
PLAY_TIME = the time last played, format HHMMSS

The new play_counter-plugin:
LAST_PLAYED = the date and time last played, format YYYY-MM-DD HH:MM:SS

afaik there is a masstagger script available to cange the old tags to the new standart.

alternatively you can change the trackinfo code.
You have to change all %last_played% to %play_time% and to modifie all lines with $substr(%last_played%,6,7
Nalco
Thank you very much for your help!!

I didnt realize I needed a plugin. Once I got the Playcount plugin, the Play stats worked perfectly.

Thanks!!!!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.