[PR #301] [MERGED] refactor(music): 优化音乐播放逻辑和数据处理 #461

Closed
opened 2026-02-27 07:11:56 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/imsyy/SPlayer/pull/301
Author: @serious-snow
Created: 11/29/2024
Status: Merged
Merged: 12/2/2024
Merged by: @imsyy

Base: devHead: dev


📝 Commits (1)

  • 49f462c refactor(music): 优化音乐播放逻辑和数据处理

📊 Changes

4 files changed (+30 additions, -12 deletions)

View changed files

📝 src/stores/data.ts (+13 -5)
📝 src/stores/music.ts (+1 -1)
📝 src/stores/status.ts (+1 -1)
📝 src/utils/player.ts (+15 -5)

📄 Description

  • 改进 setNextPlaySong 方法,处理空播放列表的情况
  • 优化重复歌曲移除逻辑,确保插入位置正确
  • 调整音乐数据重置方式,使用对象展开运算符
  • 增加播放器加载状态检查,避免未准备好时操作
  • 改进歌曲播放逻辑,处理添加到播放列表后立即播放的情况
  • 优化播放索引切换,考虑当前播放状态
  • 调整播放列表移除歌曲逻辑,优化用户体验
  • 将初始 playIndex 设置为 -1,表示未播放状态

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/imsyy/SPlayer/pull/301 **Author:** [@serious-snow](https://github.com/serious-snow) **Created:** 11/29/2024 **Status:** ✅ Merged **Merged:** 12/2/2024 **Merged by:** [@imsyy](https://github.com/imsyy) **Base:** `dev` ← **Head:** `dev` --- ### 📝 Commits (1) - [`49f462c`](https://github.com/imsyy/SPlayer/commit/49f462cdf546e6890f7987365cb02e12c6007b5e) refactor(music): 优化音乐播放逻辑和数据处理 ### 📊 Changes **4 files changed** (+30 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `src/stores/data.ts` (+13 -5) 📝 `src/stores/music.ts` (+1 -1) 📝 `src/stores/status.ts` (+1 -1) 📝 `src/utils/player.ts` (+15 -5) </details> ### 📄 Description - 改进 setNextPlaySong 方法,处理空播放列表的情况 - 优化重复歌曲移除逻辑,确保插入位置正确 - 调整音乐数据重置方式,使用对象展开运算符 - 增加播放器加载状态检查,避免未准备好时操作 - 改进歌曲播放逻辑,处理添加到播放列表后立即播放的情况 - 优化播放索引切换,考虑当前播放状态 - 调整播放列表移除歌曲逻辑,优化用户体验 - 将初始 playIndex 设置为 -1,表示未播放状态 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 07:11:56 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/SPlayer#461
No description provided.