Change the dvr_entry_update function so that it will update the entry even if only one of start, stop or title has been send via htsp

This commit is contained in:
Jörg Dembski 2011-01-07 14:30:17 +01:00
parent 5482182c80
commit cc414cc6bc

View file

@ -549,20 +549,19 @@ htsp_method_updateDvrEntry(htsp_connection_t *htsp, htsmsg_t *in)
if(htsmsg_get_u32(in, "id", &dvrEntryId))
return htsp_error("Missing argument 'id'");
if( (de = dvr_entry_find_by_id(dvrEntryId)) == NULL)
return htsp_error("id not found");
if(htsmsg_get_u32(in, "start", &start))
return htsp_error("Missing argument 'start'");
start = de->de_start;
if(htsmsg_get_u32(in, "stop", &stop))
return htsp_error("Missing argument 'stop'");
stop = de->de_stop;
title = htsmsg_get_str(in, "title");
if (title == NULL)
return htsp_error("Missing argument 'title'");
if( (de = dvr_entry_find_by_id(dvrEntryId)) == NULL)
return htsp_error("id not found");
title = de->de_title;
de = dvr_entry_update(de, title, start, stop);