]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Ignore title mismatch if dup checking by CRID
authordave-p <gh@pickles.me.uk>
Sun, 15 Jan 2023 10:09:31 +0000 (10:09 +0000)
committerFlole998 <Flole998@users.noreply.github.com>
Fri, 27 Jan 2023 00:24:01 +0000 (01:24 +0100)
Some channels add "New: " to the title if this is the first showing, so a title match with repeats will fail.

src/dvr/dvr_db.c

index 955bafcaddd8ae8d6596effef29e918e17790e4f..68614c09258616f4680b2777ec61982483596c91 100644 (file)
@@ -1801,8 +1801,10 @@ static dvr_entry_t *_dvr_duplicate_event(dvr_entry_t *de)
       if (dvr_entry_is_finished(de2, DVR_FINISHED_FAILED | DVR_FINISHED_REMOVED_FAILED))
         continue;
 
-      // if titles are not defined or do not match, don't dedup
-      if (lang_str_compare(de->de_title, de2->de_title))
+      // some channels add "New:" to the title of the first showing, so title match with repeats will fail.
+      // if we are going on to check CRIDs, ignore any title mismatch
+      // otherwise if titles are not defined or do not match, don't dedup
+      if (record != DVR_AUTOREC_RECORD_UNIQUE && lang_str_compare(de->de_title, de2->de_title))
         continue;
 
       if (match(de, de2, &aux)) {