diff --git a/MMM-BackgroundSlideshow.js b/MMM-BackgroundSlideshow.js
index 55d6fead..a6aa8885 100755
--- a/MMM-BackgroundSlideshow.js
+++ b/MMM-BackgroundSlideshow.js
@@ -172,7 +172,8 @@ Module.register('MMM-BackgroundSlideshow', {
// generic notification handler
notificationReceived: function (notification, payload, sender) {
-
+ //Quick and dirty fix to redirect the notification
+ this.socketNotificationReceived(notification,payload);
},
updateImageListWithArray: function (urls) {
@@ -261,6 +262,15 @@ Module.register('MMM-BackgroundSlideshow', {
} else if (notification === 'BACKGROUNDSLIDESHOW_PAUSE') {
// Stop timer.
this.suspend();
+ } else if (notification === 'BACKGROUNDSLIDESHOW_CHANGE_FOLDER') {
+ if (payload && payload.folder){
+ Log.log("MMM-Backgroundslideshow: Changing folder to: "+ payload.folder);
+ this.config.imagePaths[0] = payload.folder;
+ //this.imageIndex = -1;
+ this.updateImageList();
+ } else {
+ Log.log("MMM-Backgroundslideshow: Missing folder");
+ }
} else if (notification === 'BACKGROUNDSLIDESHOW_URL') {
if (payload && payload.url) {
// Stop timer.
diff --git a/README.md b/README.md
index e8f48783..e65b7648 100644
--- a/README.md
+++ b/README.md
@@ -114,6 +114,12 @@ The following notifications can be used:
Example payload: {urls:['url_to_image', 'url_to_image']}
+
BACKGROUNDSLIDESHOW_CHANGE_FOLDER