API queue mb & mbleft help

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
ktd
Newbie
Newbie
Posts: 32
Joined: April 8th, 2010, 3:56 am
Location: Stockholm, SWEDEN

API queue mb & mbleft help

Post 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?
User avatar
safihre
Administrator
Administrator
Posts: 5521
Joined: April 30th, 2015, 7:35 am
Contact:

Re: API queue mb & mbleft help

Post 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.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
ktd
Newbie
Newbie
Posts: 32
Joined: April 8th, 2010, 3:56 am
Location: Stockholm, SWEDEN

Re: API queue mb & mbleft help

Post by ktd »

Ah, I see. Thank you very much for the explanation.
Post Reply