From: Jaroslav Kysela Date: Tue, 2 Jun 2015 06:54:47 +0000 (+0200) Subject: HTSP: Fix the files/path field for dvrentry, fixes #2894 X-Git-Tag: v4.2.1~2398 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c90fb4180b6f06bf6d5bf28b3697e726dc9a6a92;p=thirdparty%2Ftvheadend.git HTSP: Fix the files/path field for dvrentry, fixes #2894 --- diff --git a/src/htsp_server.c b/src/htsp_server.c index bb94be737..d19a9c68f 100644 --- a/src/htsp_server.c +++ b/src/htsp_server.c @@ -705,9 +705,8 @@ htsp_build_dvrentry(dvr_entry_t *de, const char *method, const char *lang) last = NULL; if (!htsmsg_is_empty(de->de_files) && de->de_config) { l = htsmsg_create_list(); - htsmsg_add_msg(out, "files", l); HTSMSG_FOREACH(f, de->de_files) { - m = htsmsg_field_get_list(f); + m = htsmsg_field_get_map(f); if (m == NULL) continue; s = last = htsmsg_get_str(m, "filename"); if (s && (p = tvh_strbegins(s, de->de_config->dvr_storage)) != NULL) { @@ -716,6 +715,7 @@ htsp_build_dvrentry(dvr_entry_t *de, const char *method, const char *lang) htsmsg_add_msg(l, NULL, e); } } + htsmsg_add_msg(out, "files", l); } if(last && de->de_config)