From 2a58dc823a2248b19da6daf7864a1b0ba4c139b0 Mon Sep 17 00:00:00 2001 From: Araxeus Date: Wed, 9 Jun 2021 20:05:14 +0300 Subject: [PATCH] check if native image is empty before writing id tag --- plugins/downloader/back.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/downloader/back.js b/plugins/downloader/back.js index ee345ab2..060245ed 100644 --- a/plugins/downloader/back.js +++ b/plugins/downloader/back.js @@ -55,7 +55,9 @@ function handle(win) { { ...nowPlayingMetadata, ...currentMetadata }; try { - const coverBuffer = songMetadata.image ? songMetadata.image.toPNG() : null; + const coverBuffer = songMetadata.image && !songMetadata.image.isEmpty() ? + songMetadata.image.toPNG() : null; + const writer = new ID3Writer(songBuffer); // Create the metadata tags