From ae8e72788e8f2db33efea6045e5ee835266b10eb Mon Sep 17 00:00:00 2001 From: Manuel Bachmann Date: Tue, 26 Jan 2016 15:32:37 +0100 Subject: Fix getPostFile() upload function, return bare JSON in list getPostFile() does not fail anymore when creating a new folder (return value was incorrect). Media Plugin list API now directly returns JSON, with track list array indexed as "list". Signed-off-by: Manuel Bachmann --- plugins/media/media-rygel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/media/media-rygel.c') diff --git a/plugins/media/media-rygel.c b/plugins/media/media-rygel.c index be8cb96d..32969b2d 100644 --- a/plugins/media/media-rygel.c +++ b/plugins/media/media-rygel.c @@ -88,7 +88,7 @@ PUBLIC void _rygel_free (mediaCtxHandleT *ctx) { dev_ctx_c->content_res = NULL; } -PUBLIC char* _rygel_list (mediaCtxHandleT *ctx) { +PUBLIC json_object* _rygel_list (mediaCtxHandleT *ctx) { dev_ctx_T *dev_ctx_c = (dev_ctx_T*)ctx->media_server; json_object *json_o, *json_a; @@ -136,7 +136,7 @@ PUBLIC char* _rygel_list (mediaCtxHandleT *ctx) { json_object_object_add (json_o, "list", json_a); - return (char*) json_object_to_json_string (json_o); + return json_o; } PUBLIC unsigned char _rygel_select (mediaCtxHandleT *ctx, unsigned int index) { -- cgit 1.2.3-korg