Some VERY simple duplicate detection, I have not really started on this yet, but I thought I might as well keep this minor mod.
This commit is contained in:
parent
f5e91ea717
commit
103de71f42
1 changed files with 13 additions and 0 deletions
|
@ -354,6 +354,15 @@ dvr_entry_create_by_event(const char *config_name,
|
|||
creator, dae, pri);
|
||||
}
|
||||
|
||||
static int _dvr_duplicate_event ( epg_broadcast_t *e )
|
||||
{
|
||||
// TODO: include other searches?
|
||||
dvr_entry_t *de;
|
||||
LIST_FOREACH(de, &dvrentries, de_global_link) {
|
||||
if (de->de_bcast && (de->de_bcast->episode == e->episode)) return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -363,6 +372,10 @@ dvr_entry_create_by_autorec(epg_broadcast_t *e, dvr_autorec_entry_t *dae)
|
|||
{
|
||||
char buf[200];
|
||||
|
||||
/* Dup detection */
|
||||
// TODO: need to allow overrides
|
||||
if (_dvr_duplicate_event(e)) return;
|
||||
|
||||
if(dae->dae_creator) {
|
||||
snprintf(buf, sizeof(buf), "Auto recording by: %s", dae->dae_creator);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue