Skip to content

feat: 添加批量清除无效媒体源功能 issues/2812#2843

Open
BagunoMushi wants to merge 2 commits intoopen-ani:mainfrom
BagunoMushi:feature-2812-batch-delete-guard
Open

feat: 添加批量清除无效媒体源功能 issues/2812#2843
BagunoMushi wants to merge 2 commits intoopen-ani:mainfrom
BagunoMushi:feature-2812-batch-delete-guard

Conversation

@BagunoMushi
Copy link

变更内容:
新增“清除无效媒体源”功能,用于批量删除连接测试结果为 FAILED 的数据源。
当存在无效源,且当前未在测试、编辑或排序状态时,显示“清除无效源(n)”按钮
点击后弹出确认对话框
确认后批量删除,并提示删除成功与失败数量

代码修改:
MediaSourceGroup
新增无效源筛选与按钮显示逻辑
新增批量删除确认对话框
调用批量删除接口并显示结果提示

MediaSourceGroupState
新增 deleteMediaSources 方法及结果统计结构

补充中英文及繁体多语言字符串资源

@BagunoMushi BagunoMushi changed the title feat: 添加清除无效媒体源功能 feat: 添加批量清除无效媒体源功能 https://github.com/open-ani/animeko/issues/2812 Feb 17, 2026
@BagunoMushi BagunoMushi changed the title feat: 添加批量清除无效媒体源功能 https://github.com/open-ani/animeko/issues/2812 feat: 添加批量清除无效媒体源功能 issues/2812 Feb 17, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

本 PR 在“媒体源”设置分组中新增“清除无效媒体源”能力:当存在连接测试结果为 FAILED 的数据源时,可一键确认后批量删除,并通过 Toast 提示成功/失败数量;同时补充了中英繁体等多语言文案。

Changes:

  • 在媒体源列表页新增“清除无效源(n)”按钮、确认对话框与删除结果提示
  • EditMediaSourceState 中新增批量删除方法及删除结果统计结构
  • 补充新增功能相关的多语言字符串资源(EN/zh-CN/zh-HK/zh-TW)

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
app/shared/ui-settings/src/commonMain/kotlin/ui/settings/tabs/media/source/MediaSourceGroupState.kt 增加批量删除逻辑与结果统计,并暴露任务运行状态以供 UI 禁用交互
app/shared/ui-settings/src/commonMain/kotlin/ui/settings/tabs/media/source/MediaSourceGroup.kt 增加无效源筛选、按钮展示/禁用逻辑、确认弹窗与 Toast 结果提示
app/shared/app-lang/src/androidMain/res/values/strings.xml 添加英文文案:清除无效源/确认/结果
app/shared/app-lang/src/androidMain/res/values-zh-rCN/strings.xml 添加简体中文文案:清除无效源/确认/结果
app/shared/app-lang/src/androidMain/res/values-zh-rHK/strings.xml 添加繁体(香港)文案:清除无效源/确认/结果
app/shared/app-lang/src/androidMain/res/values-zh-rTW/strings.xml 添加繁体(台湾)文案:清除无效源/确认/结果

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Him188
Copy link
Member

Him188 commented Feb 19, 2026

删除之后过一会自动更新数据源了是不是又回来了?

@BagunoMushi
Copy link
Author

删除之后过一会自动更新数据源了是不是又回来了?

是的,我觉得这么做应该是合理的,或者我们可以在更新订阅的时候自动跑一下检测,然后弹窗提示成功添加多少个订阅,多少个订阅源因失效添加失败

@StageGuard StageGuard linked an issue Feb 24, 2026 that may be closed by this pull request
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.

添加一个一键清除无效数据源的功能

4 participants