Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
Is the media server scanner gonna be stacked on this PR? |
It's supposed to but I guess I missed a step somewhere. |
b2315e6 to
105baae
Compare
|
This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged. |
105baae to
7e1e85c
Compare
7e1e85c to
c355d99
Compare
e1d4158 to
3937280
Compare
|
This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged. |
3937280 to
2a65ca9
Compare
2a65ca9 to
ab54e8f
Compare
| if (shouldTrackEpisodes && hasEpisodeCache) { | ||
| const existingEpisodes = dbEpisodesBySeasonId.get(season.id) ?? []; | ||
| const toSave: Episode[] = []; | ||
|
|
||
| for (const existingEpisode of existingEpisodes) { | ||
| const hasFile = episodeHasFileByNumber.get( | ||
| existingEpisode.episodeNumber | ||
| ); | ||
| const currentStatus = existingEpisode[is4k ? 'status4k' : 'status']; | ||
|
|
||
| if ( | ||
| hasFile !== true && | ||
| currentStatus !== MediaStatus.DELETED && | ||
| currentStatus !== MediaStatus.UNKNOWN | ||
| ) { | ||
| existingEpisode[is4k ? 'status4k' : 'status'] = MediaStatus.DELETED; | ||
| toSave.push(existingEpisode); | ||
| } | ||
| } |
There was a problem hiding this comment.
Rows for numbers Sonarr no longer returns get marked DELETED but stay in the table, and the season route's guard counts every tracked row regardless of status:
Lines 115 to 130 in 9062976
So one renumbered episode kills badges for that whole season permanently, with only a debug line to explain it. Delete the rows whose numbers are gone instead of soft-removing them, or maybe filter DELETED out of the guard.
d7c374a to
93eab24
Compare
|
This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged. |
Description
Part 2 of #1671 to make the review easier.
Implements episode availability in Sonarr's scanner.
How Has This Been Tested?
Same tests as part 1 + server checks.
Screenshots / Logs (if applicable)
Checklist:
pnpm buildpnpm i18n:extract