]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
dvr: Start keeping programme unique IDs in the dvr log (#4652).
authorE.Smith <31170571+azlm8t@users.noreply.github.com>
Mon, 25 Sep 2017 13:47:52 +0000 (14:47 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 16 Oct 2017 16:13:28 +0000 (18:13 +0200)
Many OTA and xmltv grabbers provide a unique id for programmes.
This is useful since many films have numerous remakes but keep
the same title, but have different unique id.

By starting to keep these IDs in the dvr log we may be able to
offer an easier de-dup method.

Issue: #4652

src/dvr/dvr.h
src/dvr/dvr_db.c

index 946bab73c4627b45d148bb097e1f8af9f224c3cc..a85f9c9af337d0c4bfc75481dd9e14c85ac7ccdf 100644 (file)
@@ -203,6 +203,7 @@ typedef struct dvr_entry {
   char *de_owner;
   char *de_creator;
   char *de_comment;
+  char *de_uri;                 /* Programme unique ID */
   htsmsg_t *de_files; /* List of all used files */
   char *de_directory; /* Can be set for autorec entries, will override any 
                          directory setting from the configuration */
index bbf8a947579b52adf2239ad972658d7c39e5ae4b..dcf1270e007a4ac35ac0ed86e311d93c4cf6be8c 100644 (file)
@@ -990,6 +990,8 @@ dvr_entry_create_(int enabled, const char *config_uuid, epg_broadcast_t *e,
       htsmsg_add_str(conf, "episode", s);
     if (e->episode && e->episode->copyright_year)
       htsmsg_add_u32(conf, "copyright_year", e->episode->copyright_year);
+    if (e->episode && e->episode->uri)
+      htsmsg_add_str(conf, "uri", e->episode->uri);
   } else if (title) {
     l = lang_str_create();
     lang_str_add(l, title, lang, 0);
@@ -3470,6 +3472,14 @@ const idclass_t dvr_entry_class = {
       .off      = offsetof(dvr_entry_t, de_file_removed),
       .opts     = PO_HIDDEN | PO_NOUI,
     },
+    {
+      .type     = PT_STR,
+      .id       = "uri",
+      .name     = N_("Program unique ID (from grabber)"),
+      .desc     = N_("Program unique ID (from grabber), such as MV101010101.0000"),
+      .off      = offsetof(dvr_entry_t, de_uri),
+      .opts     = PO_RDONLY | PO_EXPERT
+    },
     {
       .type     = PT_STR,
       .id       = "autorec",