From 35f5cb9fe7983d33301ec98d3e0266697a75a3ce Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 1 Oct 2020 12:09:32 -0700 Subject: [PATCH] Return total and remaining from get_quota, don't convert to mb. --- src/mega/mega.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mega/mega.py b/src/mega/mega.py index 80fc8f6..c700ac5 100644 --- a/src/mega/mega.py +++ b/src/mega/mega.py @@ -531,7 +531,7 @@ class Mega: def get_quota(self): """ - Get current remaining disk quota in MegaBytes + Get total and remaining disk space. """ request = { 'a': 'uq', @@ -540,8 +540,7 @@ class Mega: 'v': 1 } json_resp = self._api_request(request) - # convert bytes to megabyes - return json_resp['mstrg'] / 1048576 + return {'total': json_resp['cstrg'], 'remaining': json_resp['mstrg']} def get_storage_space(self, giga=False, mega=False, kilo=False): """