Fix export_files response of only one file.
This commit is contained in:
parent
3507b72eb5
commit
46ce080a7f
1 changed files with 3 additions and 0 deletions
|
@ -611,6 +611,9 @@ class Mega:
|
||||||
self._api_request(request)
|
self._api_request(request)
|
||||||
request = [self.draft_get_file_link(node) for node in nodes]
|
request = [self.draft_get_file_link(node) for node in nodes]
|
||||||
response = self._api_request(request)
|
response = self._api_request(request)
|
||||||
|
# When there's only one file
|
||||||
|
if isinstance(response, str) and response.startswith('https://mega'):
|
||||||
|
response = [response]
|
||||||
url_map = {node['h']: url for (node, url) in zip(nodes, response)}
|
url_map = {node['h']: url for (node, url) in zip(nodes, response)}
|
||||||
return url_map
|
return url_map
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue