]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Change the dvr_entry_update function so that it will update the entry even if only... 10/head
authorJörg Dembski <gymlet@gmx.de>
Fri, 7 Jan 2011 13:30:17 +0000 (14:30 +0100)
committerJörg Dembski <gymlet@gmx.de>
Fri, 7 Jan 2011 13:30:17 +0000 (14:30 +0100)
src/htsp.c

index b71f4c3e69fe9b36b409093f028a3c29ad131f98..4429e6fb10276f7e392273de9ec2ab90ec7dbe2e 100644 (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);