PDA

View Full Version : mc.ListiItem.SetSize() limited to 9 digits



joshuajonah
January 4th, 2010, 01:13 AM
There seems to be an issue with using an integer of over 9 digits in mc.ListItem.SetSize().

This works:

item.SetSize(234592509)
print item.GetSizeFormatted()

02:09:46 T:2915552112 M:1295138816 NOTICE: 223.7 MB

This doesn't:

item.SetSize(2345925091)
print item.GetSizeFormatted()

02:11:20 T:2915552112 M:1293676544 ERROR: Scriptresult: Error
02:11:20 T:2915552112 M:1293676544 NOTICE: Traceback (most recent call last):
02:11:20 T:2915552112 M:1293676544 NOTICE: File "<string>", line 45, in ?
02:11:20 T:2915552112 M:1293676544 NOTICE: File "<string>", line 15, in __init__
02:11:20 T:2915552112 M:1293676544 NOTICE: File "<string>", line 35, in update_list
02:11:20 T:2915552112 M:1293676544 NOTICE: File "/opt/boxee/system/python/local/mc.py", line 877, in SetSize
02:11:20 T:2915552112 M:1293676544 NOTICE: return _mc.ListItem_SetSize(*args)
02:11:20 T:2915552112 M:1293676544 NOTICE: TypeError
02:11:20 T:2915552112 M:1293676544 NOTICE: :
02:11:20 T:2915552112 M:1293676544 NOTICE: in method 'ListItem_SetSize', argument 2 of type 'int'

This is tested on Latest Beta in Xubuntu 9.10. It says it's a TypeError, but as far as I can see, there's no reason it would not still be an int unless CPP is turning it into a Long and giving me the error.

DPK
January 4th, 2010, 01:22 AM
What happens if you ignore defining the size all together? Does Boxee care?

joshuajonah
January 4th, 2010, 01:34 AM
It just stays as 0kb. I want to use the size field instead of loading stuff into a string and serving it with Label2

DPK
January 4th, 2010, 02:26 AM
You should file a bug via http://jira.boxee.tv detailing everything.

marcel
January 4th, 2010, 03:45 AM
@joshuajonah please open a bug on this ..

joshuajonah
January 4th, 2010, 12:30 PM
@marcel Done. http://jira.boxee.tv/browse/BOXEE-4074