Merge pull request #40 from ckornacker/feature/dirlisting

enable normal directory listing with get_files_in_node
This commit is contained in:
Richard O'Dwyer 2013-05-08 04:15:27 -07:00
commit 9773f1e58c

View file

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