]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
HTSP/DVR: Fix the streaming of DVR files, bug introduced by dvr - remember all filena...
authorJaroslav Kysela <perex@perex.cz>
Thu, 21 May 2015 15:47:00 +0000 (17:47 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 21 May 2015 15:47:00 +0000 (17:47 +0200)
src/htsp_server.c

index 802c7cff847969ed9b9ec080c56d4dbb7d18f3c1..5c6b3895a4e98cbe649d042ebcc1f45dad09fae1 100644 (file)
@@ -2265,7 +2265,6 @@ htsp_method_file_open(htsp_connection_t *htsp, htsmsg_t *in)
 {
   const char *str, *s2;
   const char *filename = NULL;
-  htsmsg_field_t *f;
 
 
   if((str = htsmsg_get_str(in, "file")) == NULL)
@@ -2287,11 +2286,9 @@ htsp_method_file_open(htsp_connection_t *htsp, htsmsg_t *in)
     if (!htsp_user_access_channel(htsp, de->de_channel))
       return htsp_error("User does not have access");
 
-    f = htsmsg_field_last(de->de_files);
-    if (f)
-      filename = htsmsg_field_get_str(f);
+    filename = dvr_get_filename(de);
 
-    if (f == NULL || filename == NULL)
+    if (filename == NULL)
       return htsp_error("DVR entry does not have a file yet");
 
     return htsp_file_open(htsp, filename, 0);