node-red-contrib-sonospollytts
Advanced tools
Comparing version 1.1.11 to 1.1.12
@@ -8,2 +8,6 @@ ![Sample Node](img/logo.png) | ||
<p> | ||
<b>Version 1.1.12</b><br/> | ||
- Better handling of incoming msg.selectedFile property.<br/> | ||
</p> | ||
<p> | ||
<b>Version 1.1.11</b><br/> | ||
@@ -10,0 +14,0 @@ - NEW: Added DELETE ALL FILES, to allow you to delete all custom files at once.<br/> |
{ | ||
"name": "node-red-contrib-sonospollytts", | ||
"version": "1.1.11", | ||
"version": "1.1.12", | ||
"description": "Node-Red TTS with Sonos and Amazon Polly or with your own local mp3 announcement files. This node is specific for security alarm announcement, zone announcement, doorbell, weather annoucement etc.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -34,9 +34,9 @@ | ||
RED.log.warn("SonospollyTTS: Deleted file " + __dirname + "/ttspermanentfiles/" + file); | ||
fs.unlink(__dirname + "/ttspermanentfiles/" + file), err => {}; | ||
fs.unlink(__dirname + "/ttspermanentfiles/" + file), err => { }; | ||
} | ||
}); | ||
}); | ||
} catch (error) { | ||
} | ||
@@ -49,3 +49,3 @@ } else { | ||
} catch (error) { | ||
} | ||
@@ -79,9 +79,11 @@ } | ||
this.on('input', function (msg) { | ||
if (msg.payload !== undefined) { | ||
msg.payload = node.selectedFile; | ||
if (msg.hasOwnProperty("selectedFile")) { | ||
if (msg.hasOwnProperty("selectedFile")) msg.payload = "OwnFile_" + msg.selectedFile.replace(".mp3", "") + ".mp3"; | ||
node.send(msg); | ||
} else { | ||
if (msg.hasOwnProperty("selectedFile")) msg.payload = "OwnFile_" + msg.selectedFile.replace(".mp3", "") + ".mp3"; | ||
node.send(msg); | ||
}; | ||
if (msg.payload !== undefined && msg.payload === true || msg.payload === false) { | ||
msg.payload = node.selectedFile; | ||
node.send(msg); | ||
} | ||
} | ||
}); | ||
@@ -88,0 +90,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
626051
1087