mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2025-09-10 13:54:41 +02:00
16 lines
416 B
TypeScript
16 lines
416 B
TypeScript
import { downloadFile } from "../../scripts/download";
|
|
import { Logger } from "../logger";
|
|
|
|
export const downloadIcon = async (imagePath: string, destination: string): Promise<string> => {
|
|
if (imagePath.startsWith("http")) {
|
|
try {
|
|
return await downloadFile(imagePath, destination);
|
|
} catch (error) {
|
|
Logger.log("Downloading file failed", { error });
|
|
return "";
|
|
}
|
|
}
|
|
|
|
return "";
|
|
};
|