MMM-Reddit icon indicating copy to clipboard operation
MMM-Reddit copied to clipboard

Multiple Instances of Module

Open jacobHclarkson opened this issue 6 years ago • 3 comments

Is there a way to have multiple instances of the module with different parameters?

For example, image mode display of top content of a single subreddit, and then in a different position, top headlines from r/all?

jacobHclarkson avatar Mar 20 '18 09:03 jacobHclarkson

This was something that I was thinking about prior to release. I plan on looking into this, but my inclination is that Magic Mirror may not support two of the same module.

Alternatively to a native MM solution, as a hack, what you can do is to duplicate the the MMM-Reddit directory and name the new directory MMM-Reddit2. Then inside of that directory rename MMM-Reddit.js to MMM-Reddit2.js and then inside of the file you just renamed on line 1 change MMM-Reddit to MMM-Reddit2. If it's not obvious by this point, this should give you another module that functions the exact same, but is named MMM-Reddit2.

kjb085 avatar Apr 07 '18 19:04 kjb085

@kjb085 Thanks for the suggestion!

jacobHclarkson avatar Apr 21 '18 10:04 jacobHclarkson

Hey @kjb085, I managed to get both MMM-Reddit and MMM-Reddit2 to display both (I needed a restart before the images showed!), however I cannot get MMM-Reddit2 to rotate posts.

I'm working with displayType: 'image', however the code is basically just copy pasted, so I'm wondering if you know if there's technical reason why?

WolfShadowheart avatar Aug 27 '19 21:08 WolfShadowheart