From: Jaroslav Kysela Date: Fri, 29 May 2015 20:52:04 +0000 (+0200) Subject: HTSP: Fix filename for multiple files - dvrentry X-Git-Tag: v4.2.1~2417 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db77f5188cde66d0780e82efa5558b4f54e61abe;p=thirdparty%2Ftvheadend.git HTSP: Fix filename for multiple files - dvrentry --- diff --git a/src/htsp_server.c b/src/htsp_server.c index 2b828bf39..bb94be737 100644 --- a/src/htsp_server.c +++ b/src/htsp_server.c @@ -664,7 +664,7 @@ htsp_build_tag(channel_tag_t *ct, const char *method, int include_channels) static htsmsg_t * htsp_build_dvrentry(dvr_entry_t *de, const char *method, const char *lang) { - htsmsg_t *out = htsmsg_create_map(), *l, *m; + htsmsg_t *out = htsmsg_create_map(), *l, *m, *e; htsmsg_field_t *f; const char *s = NULL, *error = NULL, *subscriptionError = NULL; const char *p, *last; @@ -710,8 +710,11 @@ htsp_build_dvrentry(dvr_entry_t *de, const char *method, const char *lang) m = htsmsg_field_get_list(f); if (m == NULL) continue; s = last = htsmsg_get_str(m, "filename"); - if (s && (p = tvh_strbegins(s, de->de_config->dvr_storage)) != NULL) - htsmsg_add_msg(l, NULL, htsmsg_copy(m)); + if (s && (p = tvh_strbegins(s, de->de_config->dvr_storage)) != NULL) { + e = htsmsg_copy(m); + htsmsg_set_str(e, "filename", p); + htsmsg_add_msg(l, NULL, e); + } } }