From d3ca23a7ed5849b9e6d6330293b0f4262295f36a Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld Date: Mon, 3 Jul 2017 12:48:54 +0200 Subject: [PATCH] Fix _dvr_entry_update to allow update of retention, removal, title and subtitle for finished and ongoing recordings. htsp version bump to v28 needed to allow clients to identify the fix. --- src/dvr/dvr_db.c | 14 ++++++++++++++ src/htsp_server.c | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/dvr/dvr_db.c b/src/dvr/dvr_db.c index 5adb0b12e..828ca1a4a 100644 --- a/src/dvr/dvr_db.c +++ b/src/dvr/dvr_db.c @@ -1726,6 +1726,20 @@ static dvr_entry_t *_dvr_entry_update de->de_playposition = playposition; save |= DVR_UPDATED_PLAYPOS; } + if (retention && (retention != de->de_retention)) { + de->de_retention = retention; + save |= DVR_UPDATED_RETENTION; + } + if (removal && (removal != de->de_removal)) { + de->de_removal = removal; + save |= DVR_UPDATED_REMOVAL; + } + if (title) { + save |= lang_str_set(&de->de_title, title, lang) ? DVR_UPDATED_TITLE : 0; + } + if (subtitle) { + save |= lang_str_set(&de->de_subtitle, subtitle, lang) ? DVR_UPDATED_SUBTITLE : 0; + } } goto dosave; } diff --git a/src/htsp_server.c b/src/htsp_server.c index 42409f333..f2b140fa8 100644 --- a/src/htsp_server.c +++ b/src/htsp_server.c @@ -66,7 +66,7 @@ static void *htsp_server, *htsp_server_2; -#define HTSP_PROTO_VERSION 27 +#define HTSP_PROTO_VERSION 28 #define HTSP_ASYNC_OFF 0x00 #define HTSP_ASYNC_ON 0x01 -- 2.47.3