From: Jaroslav Kysela Date: Sat, 2 Sep 2017 16:01:15 +0000 (+0200) Subject: prop: introduce PO_PHIDDEN for transcoding code, PO_HIDDEN is mainly used as a hint... X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=469253a279f46022291a2bd2529da98fd63335a1;p=thirdparty%2Ftvheadend.git prop: introduce PO_PHIDDEN for transcoding code, PO_HIDDEN is mainly used as a hint for grids --- diff --git a/src/prop.c b/src/prop.c index 654cd0284..afee4fa00 100644 --- a/src/prop.c +++ b/src/prop.c @@ -508,6 +508,8 @@ prop_serialize_value htsmsg_add_bool(m, "noui", 1); if (opts & PO_HIDDEN) htsmsg_add_bool(m, "hidden", 1); + if (opts & PO_PHIDDEN) + htsmsg_add_bool(m, "phidden", 1); if (opts & PO_PASSWORD) htsmsg_add_bool(m, "password", 1); if (opts & PO_DURATION) diff --git a/src/prop.h b/src/prop.h index 8404ad297..d27752b3e 100644 --- a/src/prop.h +++ b/src/prop.h @@ -52,20 +52,21 @@ typedef enum { #define PO_ADVANCED (1<<4) // Property is advanced #define PO_EXPERT (1<<5) // Property is for experts #define PO_NOUI (1<<6) // Property should not be presented in the user interface -#define PO_HIDDEN (1<<7) // Property is hidden (by default) -#define PO_USERAW (1<<8) // Only save the RAW (off) value if it exists -#define PO_SORTKEY (1<<9) // Sort using key (not display value) -#define PO_PASSWORD (1<<10) // String is a password -#define PO_DURATION (1<<11) // For PT_TIME - differentiate between duration and datetime -#define PO_HEXA (1<<12) // Hexadecimal value -#define PO_DATE (1<<13) // Show date only -#define PO_LOCALE (1<<14) // Call tvh_locale_lang on string -#define PO_LORDER (1<<15) // Manage order in lists -#define PO_MULTILINE (1<<16) // Multiline string -#define PO_PERSIST (1<<17) // Persistent value (return back on save) -#define PO_DOC (1<<18) // Use doc callback instead description if exists -#define PO_DOC_NLIST (1<<19) // Do not show list in doc -#define PO_TRIM (1<<20) // Trim whitespaces (left & right) on load +#define PO_HIDDEN (1<<7) // Property column is hidden (by default) +#define PO_PHIDDEN (1<<8) // Property is permanently hidden +#define PO_USERAW (1<<9) // Only save the RAW (off) value if it exists +#define PO_SORTKEY (1<<10) // Sort using key (not display value) +#define PO_PASSWORD (1<<11) // String is a password +#define PO_DURATION (1<<12) // For PT_TIME - differentiate between duration and datetime +#define PO_HEXA (1<<13) // Hexadecimal value +#define PO_DATE (1<<14) // Show date only +#define PO_LOCALE (1<<15) // Call tvh_locale_lang on string +#define PO_LORDER (1<<16) // Manage order in lists +#define PO_MULTILINE (1<<17) // Multiline string +#define PO_PERSIST (1<<18) // Persistent value (return back on save) +#define PO_DOC (1<<19) // Use doc callback instead description if exists +#define PO_DOC_NLIST (1<<20) // Do not show list in doc +#define PO_TRIM (1<<21) // Trim whitespaces (left & right) on load /* * min/max/step helpers diff --git a/src/transcoding/codec/codecs/libs/libfdk_aac.c b/src/transcoding/codec/codecs/libs/libfdk_aac.c index 27ef945d2..2a062af66 100644 --- a/src/transcoding/codec/codecs/libs/libfdk_aac.c +++ b/src/transcoding/codec/codecs/libs/libfdk_aac.c @@ -108,7 +108,7 @@ static const codec_profile_class_t codec_profile_libfdk_aac_class = { .name = N_("Enable SBR for ELD"), .desc = N_("Enable SBR for ELD."), .group = 5, - .opts = PO_EXPERT | PO_HIDDEN, + .opts = PO_EXPERT | PO_PHIDDEN, .get_opts = codec_profile_class_profile_get_opts, .off = offsetof(tvh_codec_profile_libfdk_aac_t, eld_sbr), .def.i = 0, @@ -119,7 +119,7 @@ static const codec_profile_class_t codec_profile_libfdk_aac_class = { .name = N_("Signaling"), .desc = N_("SBR/PS signaling style."), .group = 5, - .opts = PO_EXPERT | PO_HIDDEN, + .opts = PO_EXPERT | PO_PHIDDEN, .get_opts = codec_profile_class_profile_get_opts, .off = offsetof(tvh_codec_profile_libfdk_aac_t, signaling), .list = codec_profile_libfdk_aac_class_signaling_list, diff --git a/src/transcoding/codec/profile_audio_class.c b/src/transcoding/codec/profile_audio_class.c index ee3f5bf38..667565cd9 100644 --- a/src/transcoding/codec/profile_audio_class.c +++ b/src/transcoding/codec/profile_audio_class.c @@ -297,7 +297,7 @@ const codec_profile_class_t codec_profile_audio_class = { .name = N_("Sample format"), .desc = N_("Audio sample format."), .group = 4, - .opts = PO_ADVANCED | PO_HIDDEN, + .opts = PO_ADVANCED | PO_PHIDDEN, .get_opts = codec_profile_audio_class_sample_fmt_get_opts, .off = offsetof(TVHAudioCodecProfile, sample_fmt), .list = codec_profile_audio_class_sample_fmt_list, @@ -309,7 +309,7 @@ const codec_profile_class_t codec_profile_audio_class = { .name = N_("Sample rate"), .desc = N_("Samples per second."), .group = 4, - .opts = PO_ADVANCED | PO_HIDDEN, + .opts = PO_ADVANCED | PO_PHIDDEN, .get_opts = codec_profile_audio_class_sample_rate_get_opts, .off = offsetof(TVHAudioCodecProfile, sample_rate), .list = codec_profile_audio_class_sample_rate_list, @@ -321,7 +321,7 @@ const codec_profile_class_t codec_profile_audio_class = { .name = N_("Channel layout"), .desc = N_("Audio channel layout."), .group = 4, - .opts = PO_ADVANCED | PO_HIDDEN, + .opts = PO_ADVANCED | PO_PHIDDEN, .get_opts = codec_profile_audio_class_channel_layout_get_opts, .off = offsetof(TVHAudioCodecProfile, channel_layout), .list = codec_profile_audio_class_channel_layout_list, diff --git a/src/transcoding/codec/profile_class.c b/src/transcoding/codec/profile_class.c index 79147b764..8a2236c90 100644 --- a/src/transcoding/codec/profile_class.c +++ b/src/transcoding/codec/profile_class.c @@ -32,7 +32,7 @@ tvh_codec_base_get_opts(TVHCodec *self, uint32_t opts, int visible) opts |= PO_RDONLY; } else if (visible) { - opts &= ~(PO_HIDDEN); + opts &= ~(PO_PHIDDEN); } return opts; } @@ -257,7 +257,7 @@ const codec_profile_class_t codec_profile_class = { .name = N_("Profile"), .desc = N_("Profile."), .group = 4, - .opts = PO_ADVANCED | PO_HIDDEN, + .opts = PO_ADVANCED | PO_PHIDDEN, .get_opts = codec_profile_class_profile_get_opts, .off = offsetof(TVHCodecProfile, profile), .list = codec_profile_class_profile_list, diff --git a/src/transcoding/codec/profile_video_class.c b/src/transcoding/codec/profile_video_class.c index 7768db731..ec99f0098 100644 --- a/src/transcoding/codec/profile_video_class.c +++ b/src/transcoding/codec/profile_video_class.c @@ -180,7 +180,7 @@ const codec_profile_class_t codec_profile_video_class = { .name = N_("Pixel format"), .desc = N_("Video pixel format."), .group = 4, - .opts = PO_ADVANCED | PO_HIDDEN, + .opts = PO_ADVANCED | PO_PHIDDEN, .get_opts = codec_profile_video_class_pix_fmt_get_opts, .off = offsetof(TVHVideoCodecProfile, pix_fmt), .list = codec_profile_video_class_pix_fmt_list, diff --git a/src/webui/static/app/idnode.js b/src/webui/static/app/idnode.js index 3cd86c1b5..ab23bbea4 100644 --- a/src/webui/static/app/idnode.js +++ b/src/webui/static/app/idnode.js @@ -242,7 +242,8 @@ tvheadend.IdNodeField = function(conf) this.wronly = conf.wronly; this.wronce = conf.wronce; this.noui = conf.noui; - this.hidden = conf.hidden; + this.hidden = conf.hidden || conf.phidden; + this.phidden = conf.phidden; this.uilevel = conf.expert ? 'expert' : (conf.advanced ? 'advanced' : 'basic'); this.password = conf.showpwd ? false : conf.password; this.duration = conf.duration; @@ -920,7 +921,7 @@ tvheadend.idnode_editor_form = function(uilevel, d, meta, panel, conf) ] }); } - if (p.hidden) { + if (p.phidden) { hiddenFields.push(f); } else if (p.group && meta && meta.groups) { f.tvh_uilevel = p.expert ? 'expert' : (p.advanced ? 'advanced' : 'basic');