[PR #514] [MERGED] feat(lyric): 优化歌词排除 #489

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

📋 Pull Request Information

Original PR: https://github.com/imsyy/SPlayer/pull/514
Author: @MoYingJi
Created: 10/24/2025
Status: Merged
Merged: 10/24/2025
Merged by: @imsyy

Base: devHead: feat


📝 Commits (10+)

  • f3f05aa feat(lyric): 歌词行正则排除 基本设置
  • 7f77ccb feat(lyric): 换用歌词排除函数
  • 09838e6 feat(lyric): 修改歌词排除配置页面
  • a44cd90 feat(lyric): 改个名 ExcludeKeywords -> ExcludeLyrics
  • bd06c3f fix(storage): 原来不能直接存正则
  • ca2ff2a feat(lyric): 设置项「TTML 歌词排除」
  • df42292 fix: 不排除 TTML 歌词 设置不生效
  • 3035056 优化代码
  • 4e7bd95 feat(lyric): 本地歌词排除设置项
  • 4f01877 fix(lyric): 一些错误

📊 Changes

8 files changed (+157 additions, -65 deletions)

View changed files

📝 src/assets/data/exclude.ts (+5 -4)
src/components/Modal/ExcludeKeywords.vue (+0 -20)
src/components/Modal/ExcludeLyrics.vue (+46 -0)
📝 src/components/Setting/LyricsSetting.vue (+23 -4)
📝 src/stores/setting.ts (+14 -5)
📝 src/utils/lyric.ts (+52 -23)
📝 src/utils/modal.ts (+2 -2)
📝 src/utils/player-utils/lyric.ts (+15 -7)

📄 Description

此 PR 已经编辑完成

主要变动:

  • 增加 excludeRegexes 设置项,同时增加 getExcludeRegexes 函数
  • 增加 isLyricExcluded 函数,并将所有排除歌词的逻辑替换为此函数
  • ExcludeKeywords 改名为 ExcludeLyrics
  • ExcludeLyrics 中编辑 excludeRegexes 设置项
  • 增加 enableExcludeTTML 设置项
  • 增加 enableExcludeLocalLyrics 设置项
  • 为所有调用了 isLyricExcluded 的函数增加 skipExclude 参数,调用这些函数的时候必须先判断 enableExcludeTTMLenableExcludeLocalLyrics 并以此传入 skipExclude 参数

🔄 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/514 **Author:** [@MoYingJi](https://github.com/MoYingJi) **Created:** 10/24/2025 **Status:** ✅ Merged **Merged:** 10/24/2025 **Merged by:** [@imsyy](https://github.com/imsyy) **Base:** `dev` ← **Head:** `feat` --- ### 📝 Commits (10+) - [`f3f05aa`](https://github.com/imsyy/SPlayer/commit/f3f05aa72ba273aad78890a7bb6bb39a21d24c06) feat(lyric): 歌词行正则排除 基本设置 - [`7f77ccb`](https://github.com/imsyy/SPlayer/commit/7f77ccb18a795bf91edf2fba72d5733c799bdd26) feat(lyric): 换用歌词排除函数 - [`09838e6`](https://github.com/imsyy/SPlayer/commit/09838e632d5226789c7704c388365904abe54e3c) feat(lyric): 修改歌词排除配置页面 - [`a44cd90`](https://github.com/imsyy/SPlayer/commit/a44cd904dca98d51a89cd9900d4509f6a0c089ae) feat(lyric): 改个名 ExcludeKeywords -> ExcludeLyrics - [`bd06c3f`](https://github.com/imsyy/SPlayer/commit/bd06c3f8f4d6eb909dc30eec031a28a2f5073b60) fix(storage): 原来不能直接存正则 - [`ca2ff2a`](https://github.com/imsyy/SPlayer/commit/ca2ff2a890ef4e15ef6ee6b9dc248910561d3a72) feat(lyric): 设置项「TTML 歌词排除」 - [`df42292`](https://github.com/imsyy/SPlayer/commit/df42292f0aeaaf35ba1797a16243f21992529faf) fix: 不排除 TTML 歌词 设置不生效 - [`3035056`](https://github.com/imsyy/SPlayer/commit/3035056dedb425022a3a5f2d9632fe7f6a938514) 优化代码 - [`4e7bd95`](https://github.com/imsyy/SPlayer/commit/4e7bd9536629965ae21e7e4cf72ba865c865fbd1) feat(lyric): 本地歌词排除设置项 - [`4f01877`](https://github.com/imsyy/SPlayer/commit/4f018775bad4ff7acd165ea7963e721716288547) fix(lyric): 一些错误 ### 📊 Changes **8 files changed** (+157 additions, -65 deletions) <details> <summary>View changed files</summary> 📝 `src/assets/data/exclude.ts` (+5 -4) ➖ `src/components/Modal/ExcludeKeywords.vue` (+0 -20) ➕ `src/components/Modal/ExcludeLyrics.vue` (+46 -0) 📝 `src/components/Setting/LyricsSetting.vue` (+23 -4) 📝 `src/stores/setting.ts` (+14 -5) 📝 `src/utils/lyric.ts` (+52 -23) 📝 `src/utils/modal.ts` (+2 -2) 📝 `src/utils/player-utils/lyric.ts` (+15 -7) </details> ### 📄 Description 此 PR 已经编辑完成 主要变动: - 增加 `excludeRegexes` 设置项,同时增加 `getExcludeRegexes` 函数 - 增加 `isLyricExcluded` 函数,并将所有排除歌词的逻辑替换为此函数 - `ExcludeKeywords` 改名为 `ExcludeLyrics` - 在 `ExcludeLyrics` 中编辑 `excludeRegexes` 设置项 - 增加 `enableExcludeTTML` 设置项 - 增加 `enableExcludeLocalLyrics` 设置项 - 为所有调用了 `isLyricExcluded` 的函数增加 `skipExclude` 参数,调用这些函数的时候必须先判断 `enableExcludeTTML` 和 `enableExcludeLocalLyrics` 并以此传入 `skipExclude` 参数 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 07:12:03 +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#489
No description provided.