Music Player: keep the playlist after a page reload
维护者通常 1 天内回复
@Ziqian-Huang0607 已经在做这个了。
开始于 2026年11月25日。
评估
这个 Issue 还没有评估数据。
描述
New here? Say hi on Discord first, it's the fastest way to get help: https://discord.gg/NW2YZACf4k
The Music Player (#120) keeps its playlist only in React state, so a reload clears it and you have to add tracks again from My Files.
Expected
- The playlist, the current track and the volume survive a reload.
- Shuffle and repeat settings survive too.
Suggested approach
- Store
{ trackIds, currentIndex, volume, shuffle, repeat }in the user's preferences, using the samePUT /api/users/preferencesthe Weather app uses. Add amusicfield to the preferences insrc/models/User.js. - Save only file ids (
file-<id>). Don't save the URL or any content, and rebuild the track list fromGET /api/files?meta=1on load. - Skip ids that no longer exist, for example a deleted file.
- Debounce saves, at most once every couple of seconds, so dragging the volume slider doesn't spam the API.
Where: src/context/MusicContext.js and src/models/User.js.
Done when
- Reloading keeps the playlist and settings.
- A deleted file is dropped quietly.
- Tests cover the restore and deleted-file cases.
Comment "I'd like to take this" and we'll assign you. Questions are welcome in Discord: https://discord.gg/NW2YZACf4k
- 主要语言
- JavaScript
- 星标
- 16
- 派生
- 8
- 平均合并
- 4 小时 24 分钟
- 30 天内合并 PR
- 10
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codehubbers/OrbitOS 的其他 Issue
-
difficulty: easy good first issue security
难度 1/5 1-3 小时 新手友好度 88/100
codehubbers/OrbitOS#129 ·
维护者通常 1 天内回复
-
ci difficulty: easy documentation good first issue
难度 2/5 1-3 小时 新手友好度 72/100
codehubbers/OrbitOS#80 ·
维护者通常 1 天内回复
-
difficulty: easy documentation good first issue
难度 2/5 1-3 小时 新手友好度 74/100
codehubbers/OrbitOS#79 ·
维护者通常 1 天内回复
-
difficulty: easy good first issue
难度 1/5 1 小时以内 新手友好度 72/100
codehubbers/OrbitOS#78 ·
维护者通常 1 天内回复
-
🎨 Add 5+ new high-quality wallpapers to the Settings app可能已有人在做 @anshumanjadiya1102 于 1 天前认领。 未关闭design difficulty: easy frontend good first issue
难度 2/5 1-3 小时 新手友好度 85/100
codehubbers/OrbitOS#75 ·
维护者通常 1 天内回复
查看 codehubbers/OrbitOS 的全部 Issue
相似的 Issue
-
flex-flow: wrap-reverse gets a vertical, reversed 2009 box fallback可能已有人在做 @goranai 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 86/100
postcss/autoprefixer#1577 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
-
bug
难度 1/5 1 小时以内 新手友好度 78/100
PranshulGG/WeatherMaster#1266 · 3 条评论 ·
维护者通常 1 天内回复
-
FEATURE REQUEST
难度 2/5 1-3 小时 新手友好度 67/100
linuxmint/cinnamon-spices-applets#9356 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
opnsense/plugins#5976 · 1 条评论 ·
维护者通常 1 天内回复