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.

This commit is contained in:
Lars Op den Kamp 2011-04-01 05:26:22 +08:00 committed by Andreas Öman
parent 2f47066f6e
commit 3b3669ea6e

View 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);