Skip to content

✨ feat: Fuck AI Mode#763

Merged
imsyy merged 5 commits into
devfrom
Fuck-AI
Jan 24, 2026
Merged

✨ feat: Fuck AI Mode#763
imsyy merged 5 commits into
devfrom
Fuck-AI

Conversation

@kazukokawagawa
Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @kazukokawagawa, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a user-configurable 'Fuck AI Mode' feature, providing users with the option to streamline their audio quality choices by removing certain advanced, AI-enhanced audio formats from various selection interfaces. The primary goal is to offer a cleaner, more focused audio experience for those who prefer to exclude these specific high-fidelity options, while still allowing for Dolby Atmos. This change impacts how audio quality options are presented and handled throughout the application, from download selections to playback settings.

Highlights

  • New 'Fuck AI Mode' Setting: Introduced a new toggle in the playback settings that allows users to disable the display and selection of specific advanced audio quality options, referred to as 'AI audio' qualities.
  • Audio Quality Filtering: Implemented logic across the application (download modal, player quality selection, and settings) to filter out 'jymaster', 'sky', 'jyeffect', and 'vivid' audio levels when 'Fuck AI Mode' is enabled, while retaining 'dolby' (Dolby Atmos).
  • Quality Fallback Mechanism: Added a watch effect that automatically resets the currently selected audio quality to 'Hi-Res' if the 'Fuck AI Mode' is activated and the previously selected quality was one of the now-hidden AI audio levels.
  • Utility Function Updates: Modified the handleSongQuality utility function to respect the disableAiAudio setting, ensuring that AI audio qualities are either filtered or downgraded to 'Hi-Res' when the mode is active, affecting how qualities are displayed and processed.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a feature to filter out certain AI-enhanced audio quality options. While the functionality is a good addition, the implementation has some issues with code duplication and maintainability. Specifically, the list of 'AI' audio levels is hardcoded in multiple files, and some logic is redundant or overly complex. I've left specific comments with suggestions for improvement. Also, the user-facing name for this feature should be made more professional.

Comment on lines +83 to +86
<n-text class="name">Fuck AI Mode</n-text>
<n-text class="tip" :depth="3">
开启后在所有的地方都不显示 Hi-res以上的音质选项(高清环绕声、沉浸环绕声、超清母带)保留杜比全景声
</n-text>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The feature name 'Fuck AI Mode' is unprofessional and not suitable for user-facing text. Please consider renaming it to something more descriptive and professional, for example:

          <n-text class="name">过滤 AI 音质</n-text>
          <n-text class="tip" :depth="3">
            开启后将隐藏部分 AI 增强音质选项(如超清母带、沉浸环绕声等),但会保留杜比全景声。
          </n-text>

Comment thread src/utils/helper.ts Outdated
Comment on lines 426 to 475
if (disableAiAudio) {
if (typeof song === "object" && song) {
// 如果已启用 Fuck AI,且包含 level
if ("level" in song) {
const level = song.level;
// 如果是 AI 音质,且不是 杜比,则返回 HiRe 或 SQ/HQ
if (["jymaster", "sky", "jyeffect", "vivid"].includes(level)) {
// 尝试降级显示
return QualityType.HiRes;
}
// 其他音质正常显示
}
// 云盘歌曲适配
if ("privilege" in song) {
const privilege = song.privilege;
let level = privilege?.playMaxBrLevel ?? privilege?.plLevel;

if (["jymaster", "sky", "jyeffect", "vivid"].includes(level)) {
level = "hires";
}
const quality = levelQualityMap[level];
if (quality) return quality;
}
}
// 数组遍历检查时也跳过 AI 音质 key
}


if (typeof song === "object" && song) {
// 含有 level 特殊处理
if ("level" in song) {
const quality = levelQualityMap[song.level];
// 再次检查 (如果上面没拦截住或者不想太复杂)
let quality = levelQualityMap[song.level];
if (disableAiAudio && ["Master", "Spatial", "Surround"].includes(quality)) {
// 强制降级显示或者不返回? 这里返回 HiRes 比较合理,因为文件可能还是好的,只是标变了
return QualityType.HiRes;
}
if (quality) return quality;
}
// 云盘歌曲适配
if ("privilege" in song) {
const privilege = song.privilege;
const quality = levelQualityMap[privilege?.playMaxBrLevel]
?? levelQualityMap[privilege?.plLevel];
if (disableAiAudio && ["Master", "Spatial", "Surround"].includes(quality)) {
return QualityType.HiRes;
}
if (quality) return quality;
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The logic for filtering 'AI' qualities is spread out and contains redundancies. For example, the check on lines 459-461 is redundant with the 'Fuck AI Filter' block on lines 426-451. This makes the code hard to follow and maintain.

Please consolidate all the filtering logic into a single, clear block at the beginning of the function. This will improve readability and prevent potential bugs from inconsistent checks.

Additionally, the hiddenLevels array is hardcoded in multiple places within this function. It should be imported from a shared constant.

Comment on lines +117 to +129
if (settingStore.disableAiAudio) {
return allData.filter((item) => {
// item.level is "dolby", "jymaster" etc.
// item.value is "db", "jm" etc.
if (item.level === "dolby") return true;
const hiddenLevels = ["jymaster", "sky", "jyeffect", "vivid"];
return !hiddenLevels.includes(item.level);
}).map((item) => ({
label: item.name,
value: item.value,
size: undefined,
}));
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The .map() call is duplicated for both cases (when disableAiAudio is true and false). You can simplify this by first determining the list of items to be mapped, and then calling .map() once.

Also, the hiddenLevels array is hardcoded here. This list is used across multiple files and should be extracted into a shared constant to avoid duplication and improve maintainability.

if (settingStore.disableAiAudio) {
availableQualities.value = levels.filter(q => {
if (q.level === "dolby") return true;
return !["jymaster", "sky", "jyeffect", "vivid"].includes(q.level);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The list of hidden levels ['jymaster', 'sky', 'jyeffect', 'vivid'] is hardcoded here. This list is used in multiple files. To improve maintainability, please define it as a constant in a shared file (e.g., src/utils/meta.ts) and import it here.

Comment on lines +359 to +368
if (settingStore.disableAiAudio) {
return allData.filter((item) => {
if (item.level === "dolby") return true;
const hiddenLevels = ["jymaster", "sky", "jyeffect", "vivid"];
return !hiddenLevels.includes(item.level);
}).map((item) => ({
label: item.name,
value: item.value,
}));
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Similar to DownloadModal.vue, the .map() call is duplicated here. This can be refactored to avoid repetition. The hiddenLevels array is also hardcoded and should be imported from a shared constant.

Comment thread src/components/Setting/PlaySetting.vue Outdated
Comment on lines +574 to +575
const hiddenLevels = ["jymaster", "sky", "jyeffect", "vivid"];
return !hiddenLevels.includes(option.value);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The hiddenLevels array is hardcoded here. It's also duplicated on line 586 and in several other files. This should be extracted to a shared constant (e.g., in src/utils/meta.ts) to improve maintainability.

Comment thread src/utils/helper.ts Outdated
Comment on lines +491 to +493
if (disableAiAudio && ["jm", "sk", "je"].includes(itemKey.key)) {
continue;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The list of keys ['jm', 'sk', 'je'] is hardcoded here. This list is directly related to the AI-enhanced audio levels that are being filtered. Instead of hardcoding it, this list should be derived from the shared constant for hidden levels and songLevelData to ensure consistency. For example, you could create a AI_AUDIO_LEVEL_KEYS constant alongside AI_AUDIO_LEVELS.

@imsyy imsyy merged commit eec7ea2 into dev Jan 24, 2026
4 checks passed
@kazukokawagawa kazukokawagawa deleted the Fuck-AI branch January 25, 2026 05:30
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