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.
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.