node-red-contrib-sonospollytts
Advanced tools
Comparing version 1.1.6 to 1.1.7
@@ -8,2 +8,7 @@ ![Sample Node](img/logo.png) | ||
<p> | ||
<b>Version 1.1.7</b><br/> | ||
- NEW: You can now UPLOAD your own mp3 files and play it via the newly added OwnFile node.<br/> | ||
- NEW: You can now DELETE your own mp3 files from the OwnFile node config page.<br/> | ||
</p> | ||
<p> | ||
<b>Version 1.1.6</b><br/> | ||
@@ -10,0 +15,0 @@ - NEW: You can now UPLOAD your own mp3 files and play it via the newly added OwnFile node.<br/> |
{ | ||
"name": "node-red-contrib-sonospollytts", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"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", |
@@ -24,2 +24,12 @@ | ||
// 27/02/2020 Delete OwnFile_ | ||
RED.httpAdmin.get("/deleteOwnFile", RED.auth.needsPermission('ownfile.read'), function (req, res) { | ||
try { | ||
var newPath = __dirname + "/ttspermanentfiles/" + req.query.FileName; | ||
fs.unlinkSync(newPath) | ||
} catch(err) { | ||
} | ||
res.json({ status: 220 }); | ||
}); | ||
function ownfile(config) { | ||
@@ -26,0 +36,0 @@ RED.nodes.createNode(this, config); |
Sorry, the diff of this file is not supported yet
509444
1066