Merge pull request #40 from ckornacker/feature/dirlisting

enable normal directory listing with get_files_in_node
master
Richard O'Dwyer 2013-05-08 04:15:27 -07:00
commit 9773f1e58c
1 changed files with 6 additions and 1 deletions

View File

@ -261,7 +261,12 @@ class Mega(object):
"""
Get all files in a given target, e.g. 4=trash
"""
node_id = self.get_node_by_type(target)
if target in xrange(0, 4):
# convert special nodes
node_id = self.get_node_by_type(target)
else:
node_id = [target]
files = self.api_request({'a': 'f', 'c': 1})
files_dict = {}
shared_keys = {}