• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Improve updatenotification module (to be module selective)

Scheduled Pinned Locked Moved Development
5 Posts 2 Posters 1.8k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E3V3A
    last edited by Mar 25, 2018, 9:20 AM

    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?

    "Everything I do (here) is for free – altruism is the way!"
    MMM-FlightsAbove, MMM-Tabulator, MMM-Assistant (co-maintainer)

    1 Reply Last reply Reply Quote 0
    • E Offline
      E3V3A
      last edited by Mar 29, 2018, 8:23 PM

      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.

      "Everything I do (here) is for free – altruism is the way!"
      MMM-FlightsAbove, MMM-Tabulator, MMM-Assistant (co-maintainer)

      N 1 Reply Last reply Mar 29, 2018, 9:24 PM Reply Quote 0
      • N Offline
        ninjabreadman @E3V3A
        last edited by ninjabreadman Mar 29, 2018, 9:26 PM Mar 29, 2018, 9:24 PM

        @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.

        Problem with config or JavaScript? Copy/paste it into JSHint.
        Check out the detailed walkthroughs on install, config, modules, etc.

        N 1 Reply Last reply Mar 29, 2018, 9:42 PM Reply Quote 1
        • N Offline
          ninjabreadman @ninjabreadman
          last edited by ninjabreadman Mar 30, 2018, 8:53 AM Mar 29, 2018, 9:42 PM

          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).

          Problem with config or JavaScript? Copy/paste it into JSHint.
          Check out the detailed walkthroughs on install, config, modules, etc.

          1 Reply Last reply Reply Quote 0
          • E Offline
            E3V3A
            last edited by E3V3A Mar 30, 2018, 6:48 AM Mar 30, 2018, 6:47 AM

            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…

            "Everything I do (here) is for free – altruism is the way!"
            MMM-FlightsAbove, MMM-Tabulator, MMM-Assistant (co-maintainer)

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            1 / 1
            • First post
              3/5
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy