Closed Omertron closed 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"
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.
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.
Comment #4 originally posted by Omertron on 2011-11-04T20:33:43.000Z:
Easy Solution: Use following patterns for the decimal formatter:
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 ... :-)
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
Comment #7 originally posted by Omertron on 2011-11-04T21:16:37.000Z:
OK googled a bit this will definitly do the trick :)
Original issue 2168 created by Omertron on 2011-11-04T18:14:14.000Z:
What steps will reproduce the problem?
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.