Addon config notification

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Addon config notification

Re: Addon config notification

by drakinite » Wed Sep 14, 2022 1:58 pm

You're right, thanks for the correction! Fixed now.

Re: Addon config notification

by gexptwo » Mon Sep 12, 2022 10:59 am

Looks like that works! Great thanks!
FYI on the "Getting Started (Addsons)" page (it would not let me paste URL)
under config.js example, I think

Code: Select all

        app.setValue('myAddon_config', this.state);
should be

Code: Select all

        app.setValue('myAddon_config', this.config);

Re: Addon config notification

by drakinite » Mon Sep 12, 2022 8:43 am

I see that notifySettingsChange was not documented. I've added it now.

Re: Addon config notification

by drakinite » Mon Sep 12, 2022 8:26 am

You're almost there! Just do app.notifySettingsChange() in your config file on save. Example: https://github.com/ventismedia/mediamon ... /config.js

Addon config notification

by gexptwo » Sun Sep 11, 2022 1:33 pm

I'm new to MM Addons and the forum. Sorry if this is a duplicate but have not found an answer.
I'm writing a MM5 display Addon with config. My actions_add.js does

Code: Select all

uitools.openDialog('display', .....
My display.html references display.js which does the work when trackChange occurs.

Code: Select all

app.listen(app.player, 'playbackState', displayTrack);
I figured out config.html and config.js. Question: How do I signal the display dialog window when the addon config is updated?
In display.js I tried

Code: Select all

app.listen(app, 'settingsChange', mysettings);
But this appears to only fire when the user clicks OK on the main MM Options window, not when clicking OK on my addon settings. I checked the app API but did not see a way to send a signal/event.

Top