From a85a092e5cd387e96a670b98916f2716b860495d Mon Sep 17 00:00:00 2001 From: Astrian Zheng Date: Thu, 29 May 2025 15:54:43 +1000 Subject: [PATCH] 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)