From: Jaroslav Kysela Date: Thu, 21 May 2015 15:47:00 +0000 (+0200) Subject: HTSP/DVR: Fix the streaming of DVR files, bug introduced by dvr - remember all filena... X-Git-Tag: v4.2.1~2510 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48f219c07476911f8ffb526ff0051fe9d8e465a1;p=thirdparty%2Ftvheadend.git HTSP/DVR: Fix the streaming of DVR files, bug introduced by dvr - remember all filenames patch, fixes #2861 --- diff --git a/src/htsp_server.c b/src/htsp_server.c index 802c7cff8..5c6b3895a 100644 --- a/src/htsp_server.c +++ b/src/htsp_server.c @@ -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);