MagicMirror² v2.4.1 is available! For more information about this release, check out this topic.
Please read the release notes carefully since this update requires adjustments to your Raspberry Pi configuration!

Improve updatenotification module (to be module selective)



  • I would like to see the default updatenotification module to allow us to control what modules to show for updates.

    Currently:
    I keep getting notifications for minor updates to certain modules that I do not intend to update. This is annoying, as I do not wish to disable the updatenotification module, since it is very useful for other core modules.

    It would be great to have a simpler way to select what modules we either do want or do not want to see updates from. Perhaps through an additional module option, like moduleUpdateBlacklist: [MMM-myModdedModule, MMM-CryptoCurrency]?

    I guess a workaround could be to remove the .git directory in the modules home directory, but then you remove all git features for that, which is just dumb.

    Any ideas out there?



  • Ok, this is the idea.
    We add the blacklist config option list to the module.
    When a module present in the list, the updatenotification module will rename that modules .git to .git_disabled. Tada’! No more messages…I think.



  • @E3V3A But also means you lose the metadata stored in .git to manage (incl. update later) via .git without renaming the folder.

    Why not have updatenotification iterate over/skip modules on the blacklist? Something like changing this line in node_helper.js:

    if (defaultModules.indexOf(moduleName) < 0) {
    

    To the following?

    if (defaultModules.indexOf(moduleName) < 0 &&
    this.config.ignoreModules.indexOf(moduleName) < 0){
    

    This means if the module is either (1) in defaultModules or (2) in the (new) ignoreModules it gets skipped.

    Remember to also add ignoreModules: [] to defaults in updatenotification. You can then avoid altering the filesystem whatsoever.



  • Although I concede I’m not sure how to set the config parameters for updatenotification in config.js (whether you can set params without instantiating the module).



  • Ah Yeah. That actually sound like a much better solution!
    Not sure when I’m gonna have time to implement it though. Kinda low on my priority list, right now. We’ll see…