From a85a092e5cd387e96a670b98916f2716b860495d Mon Sep 17 00:00:00 2001 From: Astrian Zheng Date: Thu, 29 May 2025 15:54:43 +1000 Subject: [PATCH 1/3] fix: add headers to axios request for range retrieval in PlayListItem.vue --- src/components/PlayListItem.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/PlayListItem.vue b/src/components/PlayListItem.vue index b29222d..2e8f5d4 100644 --- a/src/components/PlayListItem.vue +++ b/src/components/PlayListItem.vue @@ -23,7 +23,11 @@ const emit = defineEmits<{ onMounted(async () => { try { - await axios.get(props.item.song.sourceUrl ?? '') + await axios.get(props.item.song.sourceUrl ?? '', { + headers: { + 'Range': 'bytes=0-0' + } + }) } catch (error) { } // 刷新资源地址 const updatedSong = await apis.getSong(props.item.song.cid) -- 2.45.1 From 9e4b53b1e766d4781da2671d0401fa8632b4c9cd Mon Sep 17 00:00:00 2001 From: Astrian Zheng Date: Thu, 29 May 2025 15:55:38 +1000 Subject: [PATCH 2/3] fix: change axios request from GET to HEAD for song source URL in PlayListItem.vue --- src/components/PlayListItem.vue | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/components/PlayListItem.vue b/src/components/PlayListItem.vue index 2e8f5d4..cf2ba42 100644 --- a/src/components/PlayListItem.vue +++ b/src/components/PlayListItem.vue @@ -23,16 +23,13 @@ const emit = defineEmits<{ onMounted(async () => { try { - await axios.get(props.item.song.sourceUrl ?? '', { - headers: { - 'Range': 'bytes=0-0' - } - }) - } catch (error) { } - // 刷新资源地址 - const updatedSong = await apis.getSong(props.item.song.cid) - console.log('Updated song:', updatedSong) - props.item.song.sourceUrl = updatedSong.sourceUrl + await axios.head(props.item.song.sourceUrl ?? '') + } catch (error) { + // 刷新资源地址 + const updatedSong = await apis.getSong(props.item.song.cid) + console.log('Updated song:', updatedSong) + props.item.song.sourceUrl = updatedSong.sourceUrl + } }) -- 2.45.1 From bd74f3fd7248d6d19e231844a2693c681aa0fa63 Mon Sep 17 00:00:00 2001 From: Astrian Zheng Date: Thu, 29 May 2025 15:56:57 +1000 Subject: [PATCH 3/3] fix: update version number to 0.0.3 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 3e62342..598bdc4 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "MSR Mod", - "version": "0.0.2", + "version": "0.0.3", "description": "塞壬唱片(Monster Siren Records)官网的替代前端。", "content_scripts": [ { -- 2.45.1