summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-07-12 15:07:47 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-07-12 15:15:10 -0700
commit55de24928d2598694c747456d4e0c8241a99a9e5 (patch)
tree347bbeca64ff62ff2679af2e3073f9666f02fcb5 /src
parentd300ae29bc3af249374c668c4a67b8aaa153d405 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/modules/rtv/rtv.c5
1 files changed, 4 insertions, 1 deletions
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",
© All Rights Reserved