I'm trying (again) to make hotness work with playlist tree and I'm almost there...I've had to trasnlate %_system_year%,etc... stuff to %systemdate% (which is in the form of YYYYMMDD) in order to get same results. I've also changed %last_played% to %__last_played% because I use mod playcount version (from kode54). And as PT doesn't handle globals as Columns UI I had to remove every square " in the code, and change the last line in the form of
hotness=
to
$puts(hotness,
because PT can only retrieve in the form of $get(hotness) and not %_hotness%.
Anyway this give me some weird results because it doesn't match with the result I get from the column UI global, you can check it via this screenshot:
[a href=\"http://img184.exs.cx/my.php?loc=img184&image=clipboard4nc.png\" target=\"_blank\"]
$puts(baselinefrequency,14)
$puts(baselinedecay,7)
$puts(begindecaynow,1)
$puts(avgrating,3)
$if(%added%,$puts(age,$sub($add($mul($substr(%systemdate%,3,4),365),$select($substr(%systemdate%,5,6),0,31,59,90,120,151,181,212,243,273,304,334),$ifequal($mod($substr(%systemdate%,1,4),4),0,$ifgreater($substr(%systemdate%,5,6),2,1,0),0),$substr(%systemdate%,7,8)),$add($mul($substr(%added%,3,4),365),$select($substr(%added%,5,6),0,31,59,90,120,151,181,212,243,273,304,334),$ifequal($mod($substr(%added%,1,4),4),0,$ifgreater($substr(%added%,5,6),2,1,0),0),$right(%added%,2)))),$puts(age,$mul(%__play_counter%,$get(baselinefrequency))))
$puts(recentness,$sub($add($mul($substr(%systemdate%,3,4),365),$select($substr(%systemdate%,5,6),0,31,59,90,120,151,181,212,243,273,304,334),$ifequal($mod($substr(%systemdate%,1,4),4),0,$ifgreater($substr(%systemdate%,5,6),2,1,0),0),$substr(%systemdate%,7,8)),$add($mul($substr(%__last_played%,3,4),365),$select($substr(%__last_played%,6,7),0,31,59,90,120,151,181,212,243,273,304,334),$ifequal($mod($substr(%__last_played%,1,4),4),0,$ifgreater($substr(%__last_played%,6,7),2,1,0),0),$substr(%__last_played%,9,10))))
$puts(decay,$div($mul(%__play_counter%,$get(baselinefrequency),$get(baselinedecay),$if2(%rating%,$get(avgrating))),$mul($max($get(age),$get(baselinefrequency)),$get(avgrating))))
$puts(hotness,$div($mul($max($sub($get(decay),$add($get(recentness),$get(begindecaynow))),0),100),$get(decay)))
Thanks you very much.