Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Filesize tag? (Read 3396 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Filesize tag?

Is there some tag that can return the filesize of the currently playing file? In either bytes, kilobytes, or megabytes. I've searched the forums, and came up empty handed. The only thing I found was something about calcuating the filesize from the bitrate, but that doesn't produce an accurate size. I also tried a few random %tags%, no dice. Anyone?
We're all just noise on the wires..

Filesize tag?

Reply #1
Did you try out %_filesize%?

Filesize tag?

Reply #2
or this

$pad_right($div(%_filesize%,1048576).$cut($mod(%_filesize%,1048576)00,2),6) MB

Edit: this one is better
$div(%_filesize%,1048576).$div($mul($mod(%_filesize%,1048576),1000),1048576) MB

Filesize tag?

Reply #3
*sigh*

I tried %filesize% and %__filesize%, didn't try %_filesize% for some reason, thanks guys.
We're all just noise on the wires..

Filesize tag?

Reply #4
Quote
*sigh*

I tried %filesize% and %__filesize%, didn't try %_filesize% for some reason, thanks guys.

No problem.
Use %blah% to get metadata, %__blah% to get techincal info and %_blah% for nearly everything else (paths, file sizes, special fields, etc).

BTW, someone should REALLY update the title formatting help file (it's not updated since 0.7).

Filesize tag?

Reply #5
Quote
$pad_right($div(%_filesize%,1048576).$cut($mod(%_filesize%,1048576)00,2),6) MB

Edit: this one is better
$div(%_filesize%,1048576).$div($mul($mod(%_filesize%,1048576),1000),1048576) MB

Hm, it seems to occasionally report incorrectly (for instance, try 16,787,296 or 28,391,817 bytes)

Here's mine if it interests anyone. Hasn't failed me yet and does rounding as well (fixed from 20,970,875 = 19.00 -> 19.99 -> 20.00). Also displays in KiB if filesize is less than a meg. Uses a small workaround since there's currrently no function to cut left characters from a point from the right.

$if($greater(%_filesize%,1048576),
$num($left($num($muldiv(%_filesize%,100,1048576),6),4),1)
.$right($muldiv(%_filesize%,100,1048576),2) MiB,
$num($left($num($muldiv(%_filesize%,100,1024),6),4),1)
.$right($muldiv(%_filesize%,100,1024),2) KiB)

Works for filesizes up to 9999.99 MiB. Display of GiB or bytes could easily be added.
f to c to f to c

Filesize tag?

Reply #6
Quote
BTW, someone should REALLY update the title formatting help file (it's not updated since 0.7).

I agree. It'd be nice to have a detailed listing of all the metadata fields as well, since some aren't completely obvious.
We're all just noise on the wires..