INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Function Size returns time instead of size  (Read 1329 times)

ChrisRainman

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 306
  • nothing more to say...
Function Size returns time instead of size
« 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!
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42445
  • Shoes gone again!
Re: Function Size returns time instead of size
« Reply #1 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.
Logged
Matt Ashland, JRiver Media Center

ChrisRainman

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 306
  • nothing more to say...
Re: Function Size returns time instead of size
« Reply #2 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!
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42445
  • Shoes gone again!
Re: Function Size returns time instead of size
« Reply #3 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.
Logged
Matt Ashland, JRiver Media Center

ChrisRainman

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 306
  • nothing more to say...
Re: Function Size returns time instead of size
« Reply #4 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 ::)
Logged
Pages: [1]   Go Up