From: E.Smith <31170571+azlm8t@users.noreply.github.com> Date: Mon, 25 Sep 2017 13:47:52 +0000 (+0100) Subject: dvr: Start keeping programme unique IDs in the dvr log (#4652). X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ad16dee8fbc1a838fad4663b06d787a0fbaf04af;p=thirdparty%2Ftvheadend.git dvr: Start keeping programme unique IDs in the dvr log (#4652). 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 --- diff --git a/src/dvr/dvr.h b/src/dvr/dvr.h index 946bab73c..a85f9c9af 100644 --- a/src/dvr/dvr.h +++ b/src/dvr/dvr.h @@ -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 */ diff --git a/src/dvr/dvr_db.c b/src/dvr/dvr_db.c index bbf8a9475..dcf1270e0 100644 --- a/src/dvr/dvr_db.c +++ b/src/dvr/dvr_db.c @@ -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",