Stop addition of channels with empty names.
This commit is contained in:
parent
35587cfb17
commit
3b12754d1f
2 changed files with 5 additions and 1 deletions
|
@ -164,6 +164,8 @@ channel_create(const char *name, int number)
|
|||
channel_t *ch, *x;
|
||||
int id;
|
||||
|
||||
if (!name || !*name) return NULL;
|
||||
|
||||
ch = RB_LAST(&channel_identifier_tree);
|
||||
if(ch == NULL) {
|
||||
id = 1;
|
||||
|
@ -330,6 +332,8 @@ channel_rename(channel_t *ch, const char *newname)
|
|||
|
||||
lock_assert(&global_lock);
|
||||
|
||||
if (!newname || !*newname) return 0;
|
||||
|
||||
if(channel_find_by_name(newname, 0, 0))
|
||||
return -1;
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ autorec_cmp(dvr_autorec_entry_t *dae, epg_broadcast_t *e)
|
|||
if(dae->dae_title != NULL && dae->dae_title[0] != '\0') {
|
||||
if(e->episode->title == NULL ||
|
||||
regexec(&dae->dae_title_preg, e->episode->title, 0, NULL, 0))
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Note: ignore channel test if we allow quality unlocking
|
||||
|
|
Loading…
Add table
Reference in a new issue