fix: reduce requests for config

This commit is contained in:
Xinrea
2025-10-25 13:52:04 +08:00
parent b7c9d12e41
commit 2fc6f673d3

View File

@@ -140,10 +140,10 @@ async function convertFileSrc(filePath: string) {
return `${ENDPOINT}/output/${filePath}`;
}
const config = (await invoke("get_config")) as any;
const coverCache: Map<string, string> = new Map();
async function get_cover(coverType: string, coverPath: string) {
const config = (await invoke("get_config")) as any;
if (TAURI_ENV) {
if (coverType === "cache") {
const absolutePath = `${config.cache}/${coverPath}`;