To get minutes, <Time> needs to be converted entirely to seconds, then multiplied by the play count, then divided by sixty seconds.
To get seconds, do the same as above, but take the remainder of the equation at the end to get the number of seconds.
$Split($Div($Mul($Add($Mul($Pad($Split(<Time>,:,1),2),60),$Split(<Time>,:,2)),<▶️>),60),.,1) minutes $Mod($Mul($Add($Mul($Pad($Split(<Time>,:,1),2),60),$Split(<Time>,:,2)),<▶️>),60) seconds
There's a more efficient way to do this, but that's what I spit out pretty quickly.
I've tried as best as I can but couldn't figure it out. Nor could I find a place to learn how to use these functions (what does ,.,1 do?) on the internet.
This is what I have so far. Can you give me a hand, please?
$Split($Div($Mul($Add($Mul($Pad($Split(<Time>,:,1),2),60),$Split(<Time>,:,1)),<Play Count>),3600),.,1) hours $Mod($Mul($Add($Mul($Pad($Split(<Time>,:,1),2),60),$Split(<Time>,:,1)),<Play Count>),60) minutes $Mod($Mul($Add($Mul($Pad($Split(<Time>,:,1),2),60),$Split(<Time>,:,2)),<Play Count>),60) seconds
The minutes in the above don't work properly. I'm so close. I'm getting 1:00:48 when I should be getting 1:03:48.
EDIT: I think I finally got it! Can you please evaluate my code to see if I did things right? It's giving me the intended result, but want to know if I could have done something better:
$Split($Div($Mul($Add($Mul($Pad($Split(<Time>,:,1),2),60),$Split(<Time>,:,2)),<Play Count>),3600),.,1) hours $Mod($Split($Div($Mul($Add($Mul($Pad($Split(<Time>,:,1),2),60),$Split(<Time>,:,2)),<Play Count>),60),.,1),60) minutes $Mod($Mul($Add($Mul($Pad($Split(<Time>,:,1),2),60),$Split(<Time>,:,2)),<Play Count>),60) seconds
What was tripping me up was that I had to put $Mod OUTSIDE the $Split for the second line (minutes).
EDIT 2: Looks like I spoke too soon, it seems to be a bit wonky. Eg. two songs each with length 26 minutes and 18 minutes display their lengths normally, but when both are highlighted, it shows as 1 hour 6 minutes. When a third song is then highlighted, it goes back down to 31 minutes... Not sure what's going on.
EDIT 3: I think I see the issue here. When multiple songs are highlighted, the currently displayed Play Count tag value is the value of the first song that was highlighted. So it treats every highlighted song as having, say, 3 plays, multiplying their lengths by 3, when in fact one could have 3 plays, another 6, and another 20.
I suppose I need to make another virtual tag that can add the sum of Play Count for all highlighted tags.. Do you have any idea how I can do this?