]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Send 'error' (telling why a recording failed) in HTSP DVR entry message
authorAndreas Öman <andreas@lonelycoder.com>
Mon, 9 Nov 2009 21:27:15 +0000 (21:27 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Mon, 9 Nov 2009 21:27:15 +0000 (21:27 +0000)
src/htsp.c

index e539959f147fad0f7255f103f8759b3363f4cc30..64cf0d807e4ff915bc74df8138ac814c66c42b2d 100644 (file)
@@ -355,7 +355,7 @@ static htsmsg_t *
 htsp_build_dvrentry(dvr_entry_t *de, const char *method)
 {
   htsmsg_t *out = htsmsg_create_map();
-  const char *s = NULL;
+  const char *s = NULL, *error = NULL;
 
   htsmsg_add_u32(out, "id", de->de_id);
   htsmsg_add_u32(out, "channel", de->de_channel->ch_id);
@@ -375,6 +375,8 @@ htsp_build_dvrentry(dvr_entry_t *de, const char *method)
     break;
   case DVR_COMPLETED:
     s = "completed";
+    if(de->de_error)
+      error = de->de_error;
     break;
   case DVR_NOSTATE:
     s = "invalid";
@@ -382,6 +384,8 @@ htsp_build_dvrentry(dvr_entry_t *de, const char *method)
   }
 
   htsmsg_add_str(out, "state", s);
+  if(error)
+    htsmsg_add_str(out, "error", error);
   htsmsg_add_str(out, "method", method);
   return out;
 }