From: Jaroslav Kysela Date: Fri, 1 Mar 2019 15:39:30 +0000 (+0100) Subject: tvh-json.py: the list is returned instead dictionary X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0122ccb22369305f1ccfa91da8022493ff163f3e;p=thirdparty%2Ftvheadend.git tvh-json.py: the list is returned instead dictionary --- diff --git a/lib/api/python/tvh-json.py b/lib/api/python/tvh-json.py index 62df9fa02..4619d5937 100755 --- a/lib/api/python/tvh-json.py +++ b/lib/api/python/tvh-json.py @@ -124,10 +124,8 @@ def do_get(*args): def do_export(*args): if len(args) < 1: error(1, 'get [uuid]') body = do_get0('raw/export', {'uuid':args[0]}) - if type(body) != type({}): + if type(body) != type([]): error(11, 'Unknown data') - if 'entries' in body: - body = body['entries'] if len(body) == 1: body = body[0] if not 'uuid' in body: diff --git a/src/api/api_raw.c b/src/api/api_raw.c index 8f1389709..75338d2e6 100644 --- a/src/api/api_raw.c +++ b/src/api/api_raw.c @@ -184,13 +184,11 @@ api_idnode_raw_import int count = 0; const idnodes_rb_t *domain = NULL; - htsmsg_print(args); if (!(f = htsmsg_field_find(args, "node"))) return EINVAL; if (!(msg = htsmsg_field_get_list(f))) if (!(msg = htsmsg_field_get_map(f))) return EINVAL; - htsmsg_print(msg); tvh_mutex_lock(&global_lock);