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

增加列表中歌曲随机乱序排列,修复专辑名排序无效bug #1440

Merged
merged 8 commits into from
Jul 11, 2023

Conversation

findstused
Copy link
Contributor

No description provided.

@lyswhut
Copy link
Owner

lyswhut commented Jul 3, 2023

出于什么原因需要添加这个功能?

@findstused
Copy link
Contributor Author

出于什么原因需要添加这个功能?

假设把喜欢的歌共1000首加入一个歌单,每次播放顺序不同但要雨露均沾,即每轮循环每首歌曲都播且只播一次。当前的随机播放,重新打开后会清空已播列表,再加入随机列表,会有大量重复,以播放1000首歌为一轮计算,如果每次打开播放器播放50首就关闭,1000首分20次打开,极端的情况,歌曲A播20次(每次都随机到前50),而B播0次(每次都排在50靠后)。而顺序播放和循环播放可以实现每轮只播一次,但多轮播放顺序很难调会比较固定。修改后,增加了一种随机方式,保存了手工调整后的随机列表,这样下次打开也不会变,而且保证每轮每首歌只播一次。听完一轮可以重新随机一次,这样歌曲多了好像开盲盒,对下一首会有一个期待,因为都是喜欢但是近期又没播放过的,同时又没什么固定规律(比如同一个歌手,同一张专辑等),就好像路过蜿蜒崎岖的小巷不经意间听到远方隐隐约约飘来了一句喜欢的歌时那种微微一笑的喜悦,虽然其实是可以随时看到那个列表。可能这种需求太冷门?

@lyswhut lyswhut merged commit d97a273 into lyswhut:dev Jul 11, 2023
@lyswhut
Copy link
Owner

lyswhut commented Jul 11, 2023

Thanks :)

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