mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-16 20:52:06 +00:00
check if native image is empty before writing id tag
This commit is contained in:
@ -55,7 +55,9 @@ function handle(win) {
|
|||||||
{ ...nowPlayingMetadata, ...currentMetadata };
|
{ ...nowPlayingMetadata, ...currentMetadata };
|
||||||
|
|
||||||
try {
|
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);
|
const writer = new ID3Writer(songBuffer);
|
||||||
|
|
||||||
// Create the metadata tags
|
// Create the metadata tags
|
||||||
|
|||||||
Reference in New Issue
Block a user