Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(player): 插队曲目切换后下一首曲目丢失 #2118

Merged
merged 1 commit into from
Aug 26, 2023

Conversation

runnableAir
Copy link
Contributor

@runnableAir runnableAir commented Aug 21, 2023

切换到下一首插队歌曲后,排在它后面的下一首歌会跟着从队列中消失。这个bug与 issue #1908, #1644 应该属于同一个问题,这个问题用文字描述比较抽象,这里上一张动图:

插队播放bug

原因:预加载歌曲会意外导致队列的下一首歌被移除。
获取下一首id时,队列中第一个元素会被移除并返回,这在切换下一首时没有影响,但在仅仅是为了“获得”的情况下,将导致其被意外移除

思路:
修改了方法 _getNextTrack():永远只会返回队列第一个元素,不做移除操作,原本切换下一首需要的移除操作交给 playNextTrack() 完成。

@vercel
Copy link

vercel bot commented Aug 21, 2023

@runnableAir is attempting to deploy a commit to the r3play Team on Vercel.

A member of the Team first needs to authorize it.

@pan93412 pan93412 merged commit f2f4e2c into qier222:master Aug 26, 2023
@runnableAir
Copy link
Contributor Author

@pan93412 很高兴能为这个仓库作出一点贡献!由于我一开始不太了解如何将该PR正确地连接到一个issue,所以合并commit时没有自动关闭issue,你可能需要手动关闭它 #1908

@runnableAir runnableAir deleted the fix_player_play_next branch August 28, 2023 22:20
runnableAir added a commit to runnableAir/YesPlayMusic that referenced this pull request Aug 29, 2023
xiaogaozi added a commit to xiaogaozi/YesPlayMusic that referenced this pull request Apr 2, 2024
* fix: 错误的选择了音源质量 (qier222#1589)

* feat: add img tag with loading attribute for lazy loading

* fix: render weekData error

* fix: vibrant worker error

* docs: add powered by vercel

* fix: bug

* fix: 专辑分碟排序错误 (qier222#1630)

* fix: 专辑分碟排序错误

* update

* fix(dockerfile): 限制最大標頭大小

原本的Nginx.conf没有定义最大标头大小。若不手动更改,则会出现无法登陆的bug,且Nginx会返回Header too big错误。

Fixed qier222#1604

Co-Authored-By: huangyinhaow <64564727+huangyinhaow@users.noreply.github.com>

* docs: update vercel links

* fix: 歌词页视觉效果缺陷 (qier222#1649)

* fix: 部分linux发行版环境的托盘行为 (qier222#1647)

* fix: 音乐库收藏的歌单少了第一张歌单 (qier222#1657)

* chore(ci/cd): bump `actions/checkout` to v3

* chore(ci/cd): bump `actions/upload-artifact` to v3

* fix: 修复在长时间暂停后无法播放的问题 (qier222#1627)

* fix: 修复在长时间暂停后无法播放的问题

* 增加doc

* fix: 歌名翻译文本位置 & FMCard背景颜色 (qier222#1650)

* fix: 歌名翻译文本位置

* fix: 使FMCard的背景颜色永远随着歌曲改变

* fix: 私人推荐歌单 (qier222#1665)

* fix: 私人推荐歌单

* update

* feat: Add context menu on MV page (qier222#1670)

* feat: Added "Add to Playlist" on lyrics page (qier222#1671)

* fix(dockerfile): 设置 NCMAPI 版本 (qier222#1689)

* fix: dockerfile ncapi pinning

* feat: ncmapi follows version in package.json

* feat: Add "Volume Control" to Lyrics Page (qier222#1672)

* feat: Add "Volume Control" to Lyrics Page

* fix: fix mute button

* feat: Add time to lyric page (qier222#1676)

* feat: Add time on lyrics page

* feat: Add the setting item of whether to display the time on the lyrics page

* fix: fix some issue

* fix: change port to workaround 21H2's port (qier222#1706)

* fix: change port to 35216 → workaround 21H2's port
* style: with restyled (qier222#1707)
* Restyled by clang-format
* Restyled by prettier
* fix: change 21232 to 41342

Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com>
Co-authored-by: Restyled.io <commits@restyled.io>

* chore(deps): upgrade dependencies (qier222#1708)

* fix(ipcMain): unexpected “本草綱目“ from migu

This is just a workaround, and the core issue is on UNM.
However, refactoring UNM is time-comsuming and also requires
a lot of hard work. Therefore, we disable "migu" at this moment
simply.

Fixed qier222#1713
Fixed qier222#1711 (?)

* feat: add tutorial to deploy on Replit (qier222#1731)

* feat: Add status text to like button when hover event triggers (qier222#1789)

Signed-off-by: Kay Wei <weikaiii@sina.cn>

* feat: Tray icon theme now follows system theme

* feat: osdlyrics desktop lyrics support

* chore: improve translations

* refactor: improve lyric file download implement

* refactor(dockerfile): use `awk` to find NCMAPI version

* refactor(dockerfile): separate nginx config from `Dockerfile`

* feat: mount local time and time zone

* fix: 更新api以尝试解决邮箱登录问题

* fix: 更新依赖以解决手机号登录问题;UnblockNeteaseMusic 更新 (qier222#1915)

* fix: 更新api以尝试解决邮箱登录问题

* fix: 又双更新api版本以修复手机号登录问题

(可能

* deps: [测试]更新UNM到0.4.0

* update copyright year (qier222#1917)

* fix: player volume bug (qier222#1918)

* fix: player volume bug

* Update Player.js

* Update Player.js

* Update Player.js

* Update Player.js

* fix: bugs

* fix: update version

* revert: change port to workaround 21H2's port

* fix: album.company显示问题 (qier222#2009)

* Update README.md

* chore: define node engines (qier222#1943)

The `@achrinza/node-ipc` version we use in 1.x does not allow
a version of Node.js greater than 17. As YesPlayMusic has been in
maintenance mode, we define our supported Node.js engine version
rather than upgrade this dependency.

It may indicate the Vercel platform to not use 18 (or greater) in their
deployment.

The error message is:

    error @achrinza/node-ipc@9.2.2: The engine "node" is incompatible with this module. Expected version "8 || 10 || 12 || 14 || 16 || 17". Got "18.12.1"

* fix(tracklist): TrackListItem 序号问题 (qier222#2011)

直接使用 track.no 可能导致歌曲编号重复。改使用曲目在
阵列中的实际索引位置。

* fix(request): cross domain api issue (qier222#2026)

Fix the issue when NCMapi is not under the same domain
as the one frontend uses. The original method using
Vercel to proxy requests may cause latency under
some circumstances.

* fix(player): 修复歌曲时长过长时的进度显示问题 (qier222#1936)

原先进度条遇到时长超过 1hr 的歌曲,
不会呈现小时数的部分。这个 commit
将歌曲时长小时数加到分钟数中。

* fix(player): Skip track when audio source not supported (qier222#2033)

* fix: 艺人页面专辑区不显示精选集 (qier222#2046)

* fix(navbar): Fixed the issue of overlapping with the control bar (qier222#2073)

* chore(deps): Add prettier to devDependencies (qier222#2071)

* feat(settings): Internationalize some strings (qier222#2016)

* fix(login): clear last interval when calling checkQrCodeLogin (qier222#2094)

Fixed qier222#2093

* ci: Use Ubuntu 22.04 for Packaging (qier222#2107)

* feat(mpris): Add `xesam:url` field (qier222#2095)

chore: do not use fuo scheme, only netease music id is preserved

fix: lint prettier error

* feat(lyrics): Add pronunciation lyric mode (qier222#2091)

* feat: Add pronunciation lyric mode

* fix(lyrics): Fixed issue where lyric-mode-switch displays when the translation setting is off

* fix(player): 插队曲目切换后下一首曲目丢失 (qier222#2118)

* feat: use osdlyrics dbus interface to send lyric contents

* fix(ui): add max-width attr for settings selector

* feat(player): sync playing progress to mpris service on linux

Co-authored-by: alex3236 <45303195+alex3236@users.noreply.github.com>

* fix(Player.js): 右键播放不显示播放器(qier222#1965)

* refactor(Player.js): 确保在播放时播放器处于enabled状态

* fix: play icon not appear in Safari

* Support unblock via docker.

* Remove unneeded env setting

* Make docker works

* Make docker works

* remove unneeded empty line.

* 修正专辑下描述内艺人链接

* same thing on MvRow

* Create sync.yml

* fix typo

* fix: fix build && adapte for bugs in NeteasyCloudMusicAPI

* chore: remove useless space

* chore: remove useless space

* chore: bump to 0.4.8

* Update build.yaml

* Update request.js

* Fix build

* Revert "修正专辑下描述内艺人链接"

This reverts commit 3093b6f.

---------

Signed-off-by: Kay Wei <weikaiii@sina.cn>
Co-authored-by: memorydream <34763046+memorydream@users.noreply.github.com>
Co-authored-by: hawtimzhang <hawtimzhang@gmail.com>
Co-authored-by: qier222 <qier222@outlook.com>
Co-authored-by: pan93412 <pan93412@gmail.com>
Co-authored-by: huangyinhaow <64564727+huangyinhaow@users.noreply.github.com>
Co-authored-by: 郭桓桓 <hi@nekohuan.cyou>
Co-authored-by: marcus <30408959+8790@users.noreply.github.com>
Co-authored-by: Viyerelu23333 <11363469+Viyerelu23333@users.noreply.github.com>
Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com>
Co-authored-by: Restyled.io <commits@restyled.io>
Co-authored-by: jbwfu <75001777+jbwfu@users.noreply.github.com>
Co-authored-by: Kay W <weikaiii@sina.cn>
Co-authored-by: Revincx <revincx233@gmail.com>
Co-authored-by: Karbob <karbobc@gmail.com>
Co-authored-by: 草方块 <46253950+GrassBlock1@users.noreply.github.com>
Co-authored-by: タイムライン <53483352+Nep-Timeline@users.noreply.github.com>
Co-authored-by: Younglina <Younglina0409@Outlook.com>
Co-authored-by: moonrailgun <moonrailgun@gmail.com>
Co-authored-by: Holger <holgerhuo@outlook.com>
Co-authored-by: 洩氏诹诹子 <65452214+aldlss@users.noreply.github.com>
Co-authored-by: Kris Hu <i@krishu.moe>
Co-authored-by: Arthals <36695271+zhuozhiyongde@users.noreply.github.com>
Co-authored-by: guaqiu <57245152+guaqiu5@users.noreply.github.com>
Co-authored-by: Anmizi <1845513904@qq.com>
Co-authored-by: Siykt <44022526+Siykt@users.noreply.github.com>
Co-authored-by: poly000 <34085039+poly000@users.noreply.github.com>
Co-authored-by: 拆家大主教 <1984096954@qq.com>
Co-authored-by: Lvc Revincx <revincx@outlook.com>
Co-authored-by: runnableAir <83274041+runnableAir@users.noreply.github.com>
Co-authored-by: alex3236 <45303195+alex3236@users.noreply.github.com>
Co-authored-by: runnableAir <1316214297@qq.com>
Co-authored-by: leex <jsonleex@163.com>
Co-authored-by: colawithsauce <cola_with_sauce@foxmail.com>
Co-authored-by: Davy <95214375+thedavidweng@users.noreply.github.com>
Co-authored-by: GH Action - Upstream Sync <action@github.com>
Co-authored-by: undefined <undefined_1@outlook.com>
Co-authored-by: 代强 <daiqianghaha@foxmail.com>
Co-authored-by: 是虹川肉 <catkingmagnumdemon@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants