]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
HTSP: Fix the files/path field for dvrentry, fixes #2894
authorJaroslav Kysela <perex@perex.cz>
Tue, 2 Jun 2015 06:54:47 +0000 (08:54 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 2 Jun 2015 06:54:47 +0000 (08:54 +0200)
src/htsp_server.c

index bb94be737fda1dfa71426717205f8aedae39bfc5..d19a9c68fb448c9b558fc907059e170de93f4e95 100644 (file)
@@ -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)