YAMJ / yamj-v2

Yet Another Movie Jukebox (YAMJ) v2
GNU General Public License v3.0
28 stars 11 forks source link

Problem with mjb.aspectRatioPrecision still not tatally solved #2167

Closed Omertron closed 9 years ago

Omertron commented 9 years ago

Original issue 2168 created by Omertron on 2011-11-04T18:14:14.000Z:

What steps will reproduce the problem?

  1. delete moviename.xml
  2. rescan library

What is the expected output? What do you see instead? expected:<aspect>2.500:1</aspect>; seen: <aspect>2.5:1</aspect>

What version/revision of YAMJ are you using? On what operating system? r2774

What skin are you using? eversion

What device are you using YAMJ on? Networked Media Tank, PlayonHD, Other? PCH-200

Please provide any additional information below. mjb.aspectRatioPrecision not set in moviejukebox.properties this should use the default value for formatting the aspect to 3 decimal places. In case the aspect ratio end with a zero "0" or double zero "00" for example "1.900:1" or "2.500:1" only "1.9:1" or "2.5:1" is given as result. In all other cases it seems that the new formatting is performed correctly.

Omertron commented 9 years ago

Comment #1 originally posted by Omertron on 2011-11-04T19:26:34.000Z:

It's not padded with zeros as per standard decimal format.

It's not "2.350:1" its "2.35:1"

Omertron commented 9 years ago

Comment #2 originally posted by Omertron on 2011-11-04T20:15:41.000Z:

Rounding to 3 decimal places means for me 1.900 converting to a string means "1.900" i i would expect 2 decimals i would tell YAMJ to round to 2 decimals instead.

Befor introducing this new round feature it always was with 3 decimals not giving any problems for building a selection table for the needed aspect ratio pngs.

Now this is different and about 10 % of my aspect flags overlays are missing after a complete rebuild for testpurposes.

I would have expected the same behavier as before when setting aspectRatioPrecision to 3, but the behavier is different.

Omertron commented 9 years ago

Comment #3 originally posted by Omertron on 2011-11-04T20:21:09.000Z:

This was intended to format a string to output 1, 2 or 3 decimals places, the only reason its not padded is converting to float, round und convert back to string. When converting back to string the trailing zeros get truncated according to decimal format. But formatting to 3 decimals and getting 2 or 1 decimal isn't formatted to 3 decimals when working with a string.

Omertron commented 9 years ago

Comment #4 originally posted by Omertron on 2011-11-04T20:33:43.000Z:

Easy Solution: Use following patterns for the decimal formatter:

Omertron commented 9 years ago

Comment #5 originally posted by Omertron on 2011-11-04T20:38:56.000Z:

Ahjeay, should be perhaps a configurable setting in moviejukebox.properties if padding should be done or not ... :-)

Omertron commented 9 years ago

Comment #6 originally posted by Omertron on 2011-11-04T20:59:05.000Z:

Easy Solution: Use following patterns for the decimal formatter:

Wouldn't this always give 1, 2 or 3 zero doesn't matter what there was before ? I believe #.000 will format 1.900:1 to 1.000:1

Omertron commented 9 years ago

Comment #7 originally posted by Omertron on 2011-11-04T21:16:37.000Z:

OK googled a bit this will definitly do the trick :)

Omertron commented 9 years ago

Comment #8 originally posted by Omertron on 2011-11-09T13:57:01.000Z:

<empty>

Omertron commented 9 years ago

Comment #9 originally posted by Omertron on 2011-11-10T09:05:11.000Z:

This issue was closed by revision r2779.