fix: change axios request from GET to HEAD for song source URL in PlayListItem.vue
Some checks failed
构建扩展程序 / 构建 Chrome 扩展程序 (push) Successful in 1m3s
构建扩展程序 / 构建 Firefox 附加组件 (push) Has been cancelled
构建扩展程序 / 发布至 Chrome 应用商店 (push) Has been cancelled
构建扩展程序 / 发布至 Firefox 附加组件库 (push) Has been cancelled
构建扩展程序 / 发布至 Edge 附加组件商店 (push) Has been cancelled

This commit is contained in:
Astrian Zheng 2025-05-29 15:55:38 +10:00
parent a85a092e5c
commit 9e4b53b1e7
Signed by: Astrian
SSH Key Fingerprint: SHA256:rVnhx3DAKjujCwWE13aDl7uV6+9U1MvydLkNRXJrBiA

View File

@ -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
}
})
</script>