Skip to content

Commit

Permalink
fix: change the threshold of skipShortSongs to 60s
Browse files Browse the repository at this point in the history
  • Loading branch information
Clarkkkk committed Aug 5, 2024
1 parent 60fab9f commit 0cc9c61
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/pages/Setting/Setting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const { preference } = storeToRefs(usePreferenceStore())
v-model="preference.skipShortSongs"
class="w-full"
input-class="toggle-primary"
label="过滤30秒内的音乐"
explanation="自动跳过时长小于30秒的音乐"
label="过滤60秒内的音乐"
explanation="自动跳过时长小于60秒的音乐"
/>
<Switch
v-model="preference.playTracing"
Expand Down
6 changes: 3 additions & 3 deletions src/services/usePlayStatusEffect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ export const usePlayStatusEffect = () => {
}
})

// 时长不足30秒,自动切换下一首
// 时长不足60秒,自动切换下一首
watch(duration, async (val) => {
if (val > 0 && val < 31 && preference.value.skipShortSongs) {
console.log(`${currentSong.value?.name} 时长 ${val} 秒,不足30秒,自动切换下一首`)
if (val > 0 && val < 61 && preference.value.skipShortSongs) {
console.log(`${currentSong.value?.name} 时长 ${val} 秒,不足60秒,自动切换下一首`)
await switchToNextSong()
}
})
Expand Down

0 comments on commit 0cc9c61

Please sign in to comment.