apply fix from eslint

This commit is contained in:
JellyBrick
2023-08-29 19:14:51 +09:00
parent c722896a73
commit 897cfd3c7d
33 changed files with 471 additions and 524 deletions

View File

@ -69,18 +69,18 @@ module.exports.notificationImage = (songInfo) => {
}
};
module.exports.saveImage = cache((img, save_path) => {
module.exports.saveImage = cache((img, savePath) => {
try {
fs.writeFileSync(save_path, img.toPNG());
fs.writeFileSync(savePath, img.toPNG());
} catch (error) {
console.log(`Error writing song icon to disk:\n${error.toString()}`);
return icon;
}
return save_path;
return savePath;
});
module.exports.save_temp_icons = () => {
module.exports.saveTempIcon = () => {
for (const kind of Object.keys(module.exports.icons)) {
const destinationPath = path.join(userData, 'icons', `${kind}.png`);
if (fs.existsSync(destinationPath)) {