Return total and remaining from get_quota, don't convert to mb.

master
Ethan Dalool 2020-10-01 12:09:32 -07:00
parent 66c0c8f179
commit 35f5cb9fe7
1 changed files with 2 additions and 3 deletions

View File

@ -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):
"""