Page 1 of 1

API queue mb & mbleft help

Posted: January 25th, 2016, 8:43 pm
by ktd
Hi

I'm have just started to developing for iOS/tvOS and are playing around with the API for my SABnzbd server.
Right now I'm setting up the queue but having "issue" with the mb & mbleft.

My json output for the simple queue shows my "mb":46024.399725 but when I look at the SABnzbd web interface at the same time, it shows 44.9 GB. My guess is that the API gives me MB so I have to devide by 1000 to get GB, but that would would give me 46GB. Same goes for "mbleft"...

What am I doing wrong?

Re: API queue mb & mbleft help

Posted: January 25th, 2016, 9:40 pm
by safihre
You have to devide by 1024. Because 1MB = 1024KB, 1GB = 1024MB, and so on.
Only hard-drive manufactures (used to) cheat and say things like 500GB drive with small letters that they count that as 500*1000*1000KB, so the actual size in your pc would be less.

Re: API queue mb & mbleft help

Posted: January 26th, 2016, 1:17 am
by ktd
Ah, I see. Thank you very much for the explanation.