mirror of
https://github.com/Xinrea/bili-shadowreplay.git
synced 2025-11-25 04:22:24 +08:00
fix: reduce requests for config
This commit is contained in:
@@ -140,10 +140,10 @@ async function convertFileSrc(filePath: string) {
|
|||||||
return `${ENDPOINT}/output/${filePath}`;
|
return `${ENDPOINT}/output/${filePath}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const config = (await invoke("get_config")) as any;
|
||||||
const coverCache: Map<string, string> = new Map();
|
const coverCache: Map<string, string> = new Map();
|
||||||
|
|
||||||
async function get_cover(coverType: string, coverPath: string) {
|
async function get_cover(coverType: string, coverPath: string) {
|
||||||
const config = (await invoke("get_config")) as any;
|
|
||||||
if (TAURI_ENV) {
|
if (TAURI_ENV) {
|
||||||
if (coverType === "cache") {
|
if (coverType === "cache") {
|
||||||
const absolutePath = `${config.cache}/${coverPath}`;
|
const absolutePath = `${config.cache}/${coverPath}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user