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

解决 #5762 :仅合法音乐纳入背景音乐数量统计 #5798

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Ciilu
Copy link

@Ciilu Ciilu commented Mar 7, 2025

PixPin_2025-03-07_22-15-13
close #5762

@shimoranla
Copy link
Collaborator

建议改成 Close #5762

@Pigeon0v0 Pigeon0v0 added · 优化 等待确认 已经过社区确认,等待开发者确认 · Bug and removed · 优化 labels Mar 7, 2025
Copy link
Member

@LTCatt LTCatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不太应该这样修复, 这会在 UI 线程读取文件夹中的所有文件的具体内容,在音乐文件较多时会造成严重卡顿。
#5762 或许加个文件扩展名判断就行?

@LTCatt LTCatt added 等待提交者 需要提交者补充信息或进行操作 and removed 等待确认 已经过社区确认,等待开发者确认 labels Mar 7, 2025
@Pigeon0v0
Copy link
Collaborator

不太应该这样修复, 这会在 UI 线程读取文件夹中的所有文件的具体内容,在音乐文件较多时会造成严重卡顿。

#5762 或许加个文件扩展名判断就行?

RunInNewThread 呢,可以加个 Loader(

感觉写死扩展名判断不是很优雅

Dim validMusicCount As Integer = 0
For Each File In EnumerateFiles(Path & "PCL\Musics\")
Try
If {".ini", ".jpg", ".txt", ".cfg", ".lrc", ".db", ".png"}.Contains(File.Extension.ToLower) Then Continue For
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

改为了排除扩展名为 ini jpg txt cfg lrc db png 的文件,列表参考 ModMusic.vb#28

@LTCatt LTCatt added 处理中 开发者正在调查或处理该项 🟩 低 优先度:低 and removed 等待提交者 需要提交者补充信息或进行操作 labels Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
· Bug 处理中 开发者正在调查或处理该项 🟩 低 优先度:低
Projects
None yet
Development

Successfully merging this pull request may close these issues.

背景音乐数量显示错误:未校验是否是音乐文件
4 participants