Return total and remaining from get_quota, don't convert to mb.
This commit is contained in:
parent
66c0c8f179
commit
35f5cb9fe7
1 changed files with 2 additions and 3 deletions
|
@ -531,7 +531,7 @@ class Mega:
|
||||||
|
|
||||||
def get_quota(self):
|
def get_quota(self):
|
||||||
"""
|
"""
|
||||||
Get current remaining disk quota in MegaBytes
|
Get total and remaining disk space.
|
||||||
"""
|
"""
|
||||||
request = {
|
request = {
|
||||||
'a': 'uq',
|
'a': 'uq',
|
||||||
|
@ -540,8 +540,7 @@ class Mega:
|
||||||
'v': 1
|
'v': 1
|
||||||
}
|
}
|
||||||
json_resp = self._api_request(request)
|
json_resp = self._api_request(request)
|
||||||
# convert bytes to megabyes
|
return {'total': json_resp['cstrg'], 'remaining': json_resp['mstrg']}
|
||||||
return json_resp['mstrg'] / 1048576
|
|
||||||
|
|
||||||
def get_storage_space(self, giga=False, mega=False, kilo=False):
|
def get_storage_space(self, giga=False, mega=False, kilo=False):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue