From 48f219c07476911f8ffb526ff0051fe9d8e465a1 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Thu, 21 May 2015 17:47:00 +0200 Subject: [PATCH] HTSP/DVR: Fix the streaming of DVR files, bug introduced by dvr - remember all filenames patch, fixes #2861 --- src/htsp_server.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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); -- 2.47.2