From 7a938bd58cb87ea33bab9ba4dffd52dca6c06de2 Mon Sep 17 00:00:00 2001 From: Astrian Zheng Date: Fri, 30 May 2025 11:45:15 +1000 Subject: [PATCH 1/2] fix: add cache control headers and timestamp parameter to axios HEAD request in PlayListItem.vue --- src/components/PlayListItem.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/PlayListItem.vue b/src/components/PlayListItem.vue index c09e80b..f16540c 100644 --- a/src/components/PlayListItem.vue +++ b/src/components/PlayListItem.vue @@ -23,7 +23,17 @@ const emit = defineEmits<{ onMounted(async () => { try { - await axios.head(props.item.song.sourceUrl ?? '') + // 添加缓存控制头和随机参数来避免缓存 + await axios.head(props.item.song.sourceUrl ?? '', { + headers: { + 'Cache-Control': 'no-cache, no-store, must-revalidate', + 'Pragma': 'no-cache', + 'Expires': '0' + }, + params: { + _t: Date.now() // 添加时间戳参数避免缓存 + } + }) } catch (error) { // 刷新资源地址 const updatedSong = await apis.getSong(props.item.song.cid) -- 2.45.1 From ab5f021bf844b9e4280887b7b6cdfc3dd800d17b Mon Sep 17 00:00:00 2001 From: Astrian Zheng Date: Fri, 30 May 2025 11:45:28 +1000 Subject: [PATCH 2/2] fix: update version number to 0.0.5 in manifest.json --- public/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/manifest.json b/public/manifest.json index 26d214b..902e2cf 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "MSR Mod", - "version": "0.0.4", + "version": "0.0.5", "description": "塞壬唱片(Monster Siren Records)官网的替代前端。", "content_scripts": [ { -- 2.45.1