]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Set a default creator name if an empty or no creator name is provided when adding...
authorLars Op den Kamp <lars@opdenkamp.eu>
Thu, 31 Mar 2011 21:26:22 +0000 (05:26 +0800)
committerAndreas Öman <andreas@lonelycoder.com>
Sun, 3 Apr 2011 20:25:49 +0000 (04:25 +0800)
src/htsp.c

index 4318346b6b8d86d2ad2cef51523a7805e0fee12b..c6d6be25f6a89cdbe7eec0830eb2a89f68aa7619 100644 (file)
@@ -534,8 +534,8 @@ htsp_method_addDvrEntry(htsp_connection_t *htsp, htsmsg_t *in)
     if ((strDescription = htsmsg_get_str(in, "description")) == NULL)
       strDescription = "";
 
-    if ((strCreator = htsmsg_get_str(in, "creator")) == NULL)
-      strCreator = "";
+    if ((strCreator = htsmsg_get_str(in, "creator")) == NULL || strcmp(strCreator, "") == 0)
+      strCreator = htsp->htsp_username ? htsp->htsp_username : "anonymous";
 
     // create the dvr entry
     de = dvr_entry_create(dvr_config_name, channel, iStartTime, iStopTime, strTitle, strDescription, strCreator, NULL, NULL, 0, iPriority);