mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-10 10:11:46 +00:00
small refactor
This commit is contained in:
@ -51,8 +51,10 @@ function handle(win) {
|
||||
let fileBuffer = songBuffer;
|
||||
let songMetadata;
|
||||
if (currentMetadata.imageSrc) { // means metadata come from ytpl.getInfo();
|
||||
currentMetadata.image = cropMaxWidth(await getImage(currentMetadata.imageSrc));
|
||||
songMetadata = { ...currentMetadata };
|
||||
songMetadata = {
|
||||
...currentMetadata,
|
||||
image: cropMaxWidth(await getImage(currentMetadata.imageSrc))
|
||||
};
|
||||
} else {
|
||||
songMetadata = { ...metadata, ...currentMetadata };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user