Skip to content

fix(bangumi): 同步不再把整部标成看过,推未标单集时恢复在看 - #101

Merged
ModerRAS merged 1 commit into
masterfrom
fix/bangumi-sync-collection-type
Nov 17, 2026
Merged

ModerRAS merged 1 commit into
masterfrom
fix/bangumi-sync-collection-type

Conversation

@ModerRAS

Copy link
Copy Markdown
Owner

问题

Bangumi 同步在推送单集之后,会按「本地已看的集数 ≥ 本地库里的集数」把整部收藏写成「看过」(upsertSubjectCollection(type=2))。

本地库只有部分集(当季只更新了前几集,或只下了前几集)时,只要这几集看完,整部就会被标成「看过」;点一次「同步全部」,库里每一部都会被这样写一遍。

改动

  • 删除按本地已看集数推导整部完成度的逻辑,同步不再写「看过」
  • 只在真的要推送单集时动整部状态:
    • 未收藏 / 想看 → 在看
    • 线上整部是「看过」,但这集线上没标过(还在看)→ 恢复成在看
    • 已在看 / 搁置 / 抛弃 → 不动
  • 没有可推单集时不再调用 upsertSubjectCollection,避免无变化也刷新收藏更新时间
  • 播放完即时上报(markEpisodeWatched)同样处理;该集线上已标过(重看)时不动整部

测试

  • :sync-engine-shared:test 全绿
  • 新增覆盖:推未标单集→恢复在看、无可推→不写收藏、播完上报→恢复、重看→不动、全部看完→保持在看

- 去掉按本地已看集数判定整部完成度的逻辑,同步不再写「看过」
- 只在真的推送单集时动整部:未收藏/想看 -> 在看;线上已看过但该集未标 -> 恢复在看
- 无可推单集时不再写收藏,避免无变化也刷新收藏更新时间
- 播放完即时上报同样处理,重看已标过的集不动整部
@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: db9c2a29-b5ba-43d6-8953-f620fe459713
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@ModerRAS
ModerRAS merged commit 3f9e044 into master Nov 17, 2026
5 checks passed
@ModerRAS
ModerRAS deleted the fix/bangumi-sync-collection-type branch November 17, 2026 09:00
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.

1 participant