try catch for delete and wget
This commit is contained in:
parent
9f52bbb9c5
commit
d2f15e69cf
@ -58,8 +58,16 @@ exports.play = function(idx) {
|
||||
var stream2play = channel.stream;
|
||||
|
||||
var m3u = '/tmp/kitchenradio.m3u';
|
||||
fs.unlinkSync(m3u);
|
||||
wget.download(channel.stream, m3u);
|
||||
try {
|
||||
fs.unlinkSync(m3u);
|
||||
} catch(e) {
|
||||
Log.error(e);
|
||||
}
|
||||
try {
|
||||
wget.download(channel.stream, m3u);
|
||||
} catch(e) {
|
||||
Log.error(e);
|
||||
}
|
||||
|
||||
if(Helper.isDefinedAndNotNull(Child)) {
|
||||
try {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user