From 55de24928d2598694c747456d4e0c8241a99a9e5 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Wed, 12 Jul 2023 15:07:47 -0700 Subject: modules/rtv: fix settings path for channel settings The channel module name was being used as the settings instance name, which is redundant to the entries[0] "value as label" behavior with the module name also @ entries[0]. The resulting paths resembled: /module/rtv/compose/compose/layers/[N]/... /module/rtv/compose/compose/texture/... Now they are: /module/rtv/channel/compose/layers/[N]/... /module/rtv/channel/compose/texture/... There's still work to be done in this area of rtv. It's unclear if even a static "/module/rtv/channel" is correct, or if it should show the subscript of the channels[] entry currently being used when that becomes a proper nested settings situation, i.e. /module/rtv/channels/[0]/compose/layers/[N]/... ... /module/rtv/channels/[1]/spiro ... /module/rtv/channels/[2]/roto ... for a "channels=compose,spiro,roto" kind of hypothetical another option which might make sense is to have the channel path more like an auto-increment identifier so the channel contexts have unique paths and don't collide on the stream. This could be important for scenarios utilizing the "ref" module and trying to reuse parts of the context from one channel to the next. When the paths collide things tend to break in weird ways presently. this area needs more thought --- src/modules/rtv/rtv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/modules/rtv') diff --git a/src/modules/rtv/rtv.c b/src/modules/rtv/rtv.c index 18a2a1a..9cf025a 100644 --- a/src/modules/rtv/rtv.c +++ b/src/modules/rtv/rtv.c @@ -192,7 +192,10 @@ static void setup_next_channel(rtv_context_t *ctxt, unsigned ticks) * should be possible with more work... there just needs to be a way to put the setup in a mode * where leaving things unspecified is acceptable. */ - til_settings_t *settings = til_settings_new(ctxt->til_module_context.setup->path, NULL, ctxt->channel->module->name, ctxt->channel->module->name /* XXX: we can at least toss the bare-value module name in there, but this should really come from the rtv channels= entries */); + til_settings_t *settings = til_settings_new(ctxt->til_module_context.setup->path, + NULL, + "channel", + ctxt->channel->module->name /* XXX: this should come from the channel settings */); (void) til_module_setup_randomize(ctxt->channel->module, settings, rand_r(&ctxt->til_module_context.seed), &ctxt->channel->module_setup, &settings_as_arg); caption = txt_newf("Title: %s%s%s\nDescription: %s%s%s", -- cgit v1.2.1