Skip to main content
Topic: Playlist statistics. (Read 3881 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Playlist statistics.

Is there a component that will display the currently selected play list's total play time, total tracks, etc, in the red area in the pic?


EDIT: I stuffed up the pic, the red bit is supposed to be under the playlist tabs.

Playlist statistics.

Reply #1
see pic below



you can display all that you discribed in this playlsit dropdown toolbar panel, but i'ts for ColumnsUI or PanelsUI layouts only




Playlist statistics.

Reply #5
Ok, I'll re-use this thread.

Code: [Select]
%title% ~$rgb(64,156,64,255,255,255)$if(%isactive%,' (Active'$if(%isplaying%,', Playing')')',$if(%isplaying%,' (playing)'))
$tab(3)[ '('%lock%')']$tab(2)
$rgb(0,0,255,160,240,120)%size% Songs / $div(%filesize%,1048576)
MB

'('$div(%filesize%,1048576000) GB')'

$rgb(127,127,127,255,255,255)' (Total Playtime: '%length%')'



That's what I currently have.

What I would like to do is merge the MB and GB, so that it displays it in GB only if it actually adds up to atleast a gigabyte, else it displays it in megabytes.

I have no idea where to start with this...
I was thinking it would be much the same as:
Code: [Select]
$info(codec)$if($strcmp($info(encoding),lossy), @ $info(bitrate)kbps,: Lossless)
...with a few things changed, but it says $info is an unknown function.

Playlist statistics.

Reply #6
Code: [Select]
...$ifgreater(%filesize%,1048575999,$div(%filesize%,1048576000) GB,$div(%filesize%,1048576) MB)...
Full-quoting makes you scroll past the same junk over and over.

Playlist statistics.

Reply #7
Thank you very much Yirkha

EDIT: How would I add decimal places to the gigabytes?

Playlist statistics.

Reply #8
Code: [Select]
...$puts(x,$muldiv(%filesize%,100,1048576000))$insert($get(x),.,$sub($len($get(x)),2))...
Full-quoting makes you scroll past the same junk over and over.

Playlist statistics.

Reply #9
Thanks again Yirkha, but I have no idea where that goes.
Could you possibly paste it in the appropriate place in the following code, so that I can copy/paste it?
Code: [Select]
%title% ~$rgb(64,156,64,255,255,255)$if(%isactive%,' (Active'$if(%isplaying%,', Playing')')',$if(%isplaying%,' (playing)'))
$tab(3)[ '('%lock%')']$tab(2)
$rgb(0,0,255,160,240,120)%size% Songs / $ifgreater(%filesize%,1048575999,$div(%filesize%,1048576000) GB,$div(%filesize%,1048576) MB)
$rgb(127,127,127,255,255,255)' (Total Playtime: '%length%')'


EDIT: Kinda have it.

Except the decimals are appearing after the MB...

Playlist statistics.

Reply #10
Quote
%title% ~$rgb(64,156,64,255,255,255)$if(%isactive%,' (Active'$if(%isplaying%,', Playing')')',$if(%isplaying%,' (playing)'))
$tab(3)[ '('%lock%')']$tab(2)
$rgb(0,0,255,160,240,120)%size% Songs / $div(%filesize%,1048576)
MB

'('$div(%filesize%,1048576000) GB')'


$rgb(127,127,127,255,255,255)' (Total Playtime: '%length%')'
>>
Quote
...$ifgreater(%filesize%,1048575999,$div(%filesize%,1048576000) GB,$div(%filesize%,1048576) MB)...
>>
Quote
...$puts(x,$muldiv(%filesize%,100,1048576000))$insert($get(x),.,$sub($len($get(x)),2))...
Full-quoting makes you scroll past the same junk over and over.


Playlist statistics.

Reply #12
Meh, $ifgreater() and $muldiv() does not work with large numbers...
Code: [Select]
$ifgreater($put(m,$div($add(%filesize%,524288),1048576)),999,$puts(g,$muldiv($get(m),100,1000))$insert($get(g),.,$sub($len($get(g)),2)) GB,$get(m) MB)
Full-quoting makes you scroll past the same junk over and over.


Playlist statistics.

Reply #14
Sorr for bumping this thread

With recent version of foo_uie_playlists_dropdown (0.6.9.9), you can use
Code: [Select]
%filesize_natural%

formatting field, which displays formatted total playlist file size, e.g. 62.1GB or 322KB.

Note, that it works in playlist views too, so there is no more need to calculate file sizes using formatting scripts.

Playlist statistics.

Reply #15
Yeah, %filesize_natural% is another new 0.9.6 feature, thanks for reminding.
Full-quoting makes you scroll past the same junk over and over.

 
SimplePortal 1.0.0 RC1 © 2008-2020