INTERACT FORUM

More => Old Versions => Media Center 14 (Development Ended) => Topic started by: ChrisRainman on January 14, 2010, 05:41:24 am

Title: Function Size returns time instead of size
Post by: ChrisRainman on January 14, 2010, 05:41:24 am
Maybe nobody ever tried it :o

When using the function size() for mp3 files it returns the duration of song instead of file size!
Title: Re: Function Size returns time instead of size
Post by: Matt on January 14, 2010, 08:40:38 am
Use [File Size, 0] to get the number of bytes of the physical file and [File Size, 1] to get a formatted display like 4.2 MB.
Title: Re: Function Size returns time instead of size
Post by: ChrisRainman on January 14, 2010, 09:16:47 am
Use [File Size, 0] to get the number of bytes of the physical file and [File Size, 1] to get a formatted display like 4.2 MB.

Tha works fine - but anyway the function returns an unexpected result. Maybe it should be deleted to prevent confusion...

Thanks!
Title: Re: Function Size returns time instead of size
Post by: Matt on January 14, 2010, 09:59:08 am
Tha works fine - but anyway the function returns an unexpected result. Maybe it should be deleted to prevent confusion...

Thanks!

The Size(...) function has this description (available in the tooltip for the function in an expression editor):
Returns the size of a file in a media type independent manner.

Try it with images or videos to see what it's up to.
Title: Re: Function Size returns time instead of size
Post by: ChrisRainman on January 14, 2010, 10:09:36 am
The Size(...) function has this description (available in the tooltip for the function in an expression editor):
Returns the size of a file in a media type independent manner.

Try it with images or videos to see what it's up to.

Yes, I've seen the description. Anyway, it's at least confusing what it returns for the different media types:

Audio: duration of track
Video: duration of movie
Picture: Pixel resolution

If that's what it is intended for, ok - then it's just not intuitive ::)