From: DeltaMikeCharlie <127641886+DeltaMikeCharlie@users.noreply.github.com> Date: Sun, 26 Apr 2026 01:39:26 +0000 (+1000) Subject: [WebUI] Option to hide seconds in DVR Dialogue. X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;p=thirdparty%2Ftvheadend.git [WebUI] Option to hide seconds in DVR Dialogue. --- diff --git a/src/config.c b/src/config.c index 1c4098e0a..45cba706b 100644 --- a/src/config.c +++ b/src/config.c @@ -1779,6 +1779,7 @@ config_boot config.iptv_tpool_count = 2; config.date_mask = strdup(""); config.label_formatting = 0; + config.dvr_show_seconds = 1; config.hdhomerun_ip = strdup(""); config.local_ip = strdup(""); config.local_port = 0; @@ -2396,6 +2397,17 @@ const idclass_t config_class = { .opts = PO_DOC_NLIST, .group = 2 }, + { + .type = PT_BOOL, + .id = "dvr_show_seconds", + .name = N_("Show DVR seconds"), + .desc = N_("Show seconds in the DVR entry add/edit dialogue window. " + "If disabled, existing seconds can not be edited and " + "new entries will have seconds set to zero."), + .opts = PO_ADVANCED, + .off = offsetof(config_t, dvr_show_seconds), + .group = 2, + }, { .type = PT_BOOL, .id = "label_formatting", diff --git a/src/config.h b/src/config.h index 0cab40962..d480008cd 100644 --- a/src/config.h +++ b/src/config.h @@ -72,6 +72,7 @@ typedef struct config { int iptv_tpool_count; char *date_mask; int label_formatting; + int dvr_show_seconds; uint32_t ticket_expires; char *hdhomerun_ip; char *local_ip; diff --git a/src/webui/comet.c b/src/webui/comet.c index 2554170de..b115fefdb 100644 --- a/src/webui/comet.c +++ b/src/webui/comet.c @@ -193,9 +193,8 @@ comet_access_update(http_connection_t *hc, comet_mailbox_t *cmb) htsmsg_add_u32(m, "chname_src", config.chname_src); htsmsg_add_str(m, "date_mask", config.date_mask); htsmsg_add_u32(m, "label_formatting", config.label_formatting); - htsmsg_add_u32(m, "default_tab", default_tab); - + htsmsg_add_u32(m, "dvr_show_seconds", config.dvr_show_seconds); if (!access_noacl) htsmsg_add_str(m, "username", username); if (hc->hc_peer_ipstr) diff --git a/src/webui/static/app/idnode.js b/src/webui/static/app/idnode.js index 07b2e17c4..cb9a78e58 100644 --- a/src/webui/static/app/idnode.js +++ b/src/webui/static/app/idnode.js @@ -786,9 +786,9 @@ tvheadend.idnode_editor_field = function(f, conf) value: value, disabled: false, width: 300, - timeFormat: 'H:i:s', + timeFormat: tvheadend.dvr_show_seconds ? 'H:i:s' : 'H:i', timeConfig: { - altFormats: 'H:i:s', + altFormats: 'H:i:s|H:i', allowBlank: true, increment: 10 }, diff --git a/src/webui/static/app/tvheadend.js b/src/webui/static/app/tvheadend.js index e135ea8ca..48308a2f8 100644 --- a/src/webui/static/app/tvheadend.js +++ b/src/webui/static/app/tvheadend.js @@ -41,6 +41,7 @@ tvheadend.docs_toc = null; tvheadend.doc_history = []; tvheadend.doc_win = null; tvheadend.date_mask = ''; +tvheadend.dvr_show_seconds = true; tvheadend.label_formatting = false; tvheadend.language = window.navigator.userLanguage || window.navigator.language; tvheadend.default_tab = CONFIG_DEFAULT_TAB_EPG; @@ -1057,6 +1058,7 @@ function accessUpdate(o) { tvheadend.chname_num = o.chname_num ? 1 : 0; tvheadend.chname_src = o.chname_src ? 1 : 0; tvheadend.date_mask = o.date_mask; + tvheadend.dvr_show_seconds = o.dvr_show_seconds ? true : false; tvheadend.label_formatting = o.label_formatting ? true : false; tvheadend.page_size = o.page_size; tvheadend.default_tab = o.default_tab ? o.default_tab : CONFIG_DEFAULT_TAB_EPG;