kjb085 / MMM-Reddit

Magic Mirror Module for displaying top level content from reddit
34 stars 7 forks source link

subreddits not working for image display type #24

Closed michix99 closed 3 years ago

michix99 commented 3 years ago

When trying to configure the plugin, I played around with the "subreddit" property. It did only work for the given expample ("earthporn") but did not for any other value like "all" or "frontpage" for example. It displays nothing but the header and gives the following error output: [2020-09-06 22:55:36.426] [ERROR] TypeError: Cannot read property 'width' of undefined at Class.getAllImages (/home/pi/MagicMirror/modules/MMM-Reddit/node_helper.js:229:38) at Class.getImageUrl (/home/pi/MagicMirror/modules/MMM-Reddit/node_helper.js:178:34) at /home/pi/MagicMirror/modules/MMM-Reddit/node_helper.js:76:45 at Array.forEach () at Request._callback (/home/pi/MagicMirror/modules/MMM-Reddit/node_helper.js:70:44) at Request.self.callback (/home/pi/MagicMirror/node_modules/request/request.js:185:22) at Request.emit (events.js:200:13) at Request. (/home/pi/MagicMirror/node_modules/request/request.js:1154:10) at Request.emit (events.js:200:13) at IncomingMessage. (/home/pi/MagicMirror/node_modules/request/request.js:1076:12)

with the following configuration: config: { subreddit: 'frontpage', displayType: 'image', imageQuality: 'high', count: 10, show: 1, width: 500, showAll: true, }

If I got it right, I should be able to use a different subreddit, or is it supposed to work only with specific categories? Thanks!

michix99 commented 3 years ago

fixed it by commenting every other module and restarting the machine, still don't know, what went wrong...