Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
HTSP/DVR: Fix the streaming of DVR files, bug introduced by dvr - rem…
…ember all filenames patch, fixes #2861
  • Loading branch information
perexg committed May 21, 2015
1 parent 4398654 commit 48f219c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/htsp_server.c
Expand Up @@ -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)
Expand All @@ -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);
Expand Down

0 comments on commit 48f219c

Please sign in to comment.