From 018a6596f3b4768a5d000dde65cb30ead5e8962f Mon Sep 17 00:00:00 2001 From: foxriver76 Date: Wed, 20 Sep 2023 08:04:42 +0200 Subject: [PATCH] fix this.name -> adapter.name --- main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index ba915a5..e7a271f 100644 --- a/main.js +++ b/main.js @@ -1480,12 +1480,12 @@ async function takeSonosState(ip, sonosState) { } } if (fileData) { - await adapter.writeFileAsync(this.name, fileName, fileData); + await adapter.writeFileAsync(adapter.name, fileName, fileData); adapter.setState({ device: 'root', channel: ip, state: 'current_cover' - }, { val: `/files/${this.name}/${fileName}`, ack: true }); + }, { val: `/files/${adapter.name}/${fileName}`, ack: true }); } } @@ -1561,8 +1561,8 @@ async function syncCoverFileToStorage(fileName, ip) { } if (fileData) { - await adapter.writeFileAsync(this.name, fileName, fileData); - adapter.setState({ device: 'root', channel: ip, state: 'current_cover' }, { val: `/files/${this.name}/${fileName}`, ack: true }); + await adapter.writeFileAsync(adapter.name, fileName, fileData); + adapter.setState({ device: 'root', channel: ip, state: 'current_cover' }, { val: `/files/${adapter.name}/${fileName}`, ack: true }); } }