From: Lars Op den Kamp Date: Thu, 31 Mar 2011 21:26:22 +0000 (+0800) Subject: Set a default creator name if an empty or no creator name is provided when adding... X-Git-Tag: 2.99~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b3669ea6ec66dfd7ee09ed2f38e148d8e35d7f0;p=thirdparty%2Ftvheadend.git Set a default creator name if an empty or no creator name is provided when adding a DVR entry without an EPG event. Adding an entry with an empty creator name causes the GUI not to display any DVR entry at all. --- diff --git a/src/htsp.c b/src/htsp.c index 4318346b6..c6d6be25f 100644 --- a/src/htsp.c +++ b/src/htsp.c @@ -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);