Skip to content

Handle duplicate NZB segments with fallback#310

Open
arubi9 wants to merge 1 commit intonzbdav-dev:mainfrom
arubi9:fix-duplicate-segments
Open

Handle duplicate NZB segments with fallback#310
arubi9 wants to merge 1 commit intonzbdav-dev:mainfrom
arubi9:fix-duplicate-segments

Conversation

@arubi9
Copy link

@arubi9 arubi9 commented Mar 8, 2026

Summary

  • preserve NZB segment numbers and collapse duplicate numbers into a single logical segment with ordered fallback candidates
  • retry duplicate segment candidates for STAT, HEAD, ARTICLE, BODY, streaming, queue prechecks, and health checks before treating a segment as missing
  • add focused regression tests for duplicate-segment parsing and fallback streaming/check behavior

Validation

  • dotnet build backend/NzbWebDAV.csproj
  • dotnet test backend.Tests/backend.Tests.csproj

Closes #252.

@arubi9
Copy link
Author

arubi9 commented Mar 8, 2026

If some can provide feedback on code changes, that would be great.

@Root-Core
Copy link
Contributor

This looks like an unnecessarily large amount of code to solve this issue, so I skipped the review.


I think it could be solved much more easily: first, parse the candidates into a map.
If one candidate fails, simply try the next one.
You could also store the ID of the working candidates somewhere if it isn't the first.

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.

Duplicate segments not being handled

2 participants