From 28f69e197796f72377dc010782409635bea87a3f Mon Sep 17 00:00:00 2001 From: Christian Kornacker Date: Mon, 6 May 2013 15:04:02 +0200 Subject: [PATCH] enable directory listing with get_files_in_node --- mega/mega.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mega/mega.py b/mega/mega.py index d6ac841..d55f2a9 100644 --- a/mega/mega.py +++ b/mega/mega.py @@ -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 = {}