hi biggrin.gif

i'm creating a "how popular is this track" or "hottness" feature for my SCPL
a rating if you will for how popular a track currently is compared against all tracks in the active playlist, yes i know this has been done before

one of the criteria i want to use is: how many times has a track been played vs the cumulative amount of plays for all tracks

i came up with this to create a running count of the cumulative plays of all tracks
CODE
// PerSecond

$if(%isplaying%,

$ifequal(%playback_time_seconds%,60,
$setpvar(playcountdb,$eval(1+$getpvar(playcountdb)))
,)

)


but this has flaws, the biggest and most obvious being if any track's playcount gets reset or if the track is all-together removed, then the track vs total count comparison is thrown off

anyone have any ideas/code on how to create a cumulative playcount database that doesn't have these drawbacks

maybe there is a component or some really obvious way of doing this