feat(api): add skip_arr_notification option to POST /import/file#521
Merged
feat(api): add skip_arr_notification option to POST /import/file#521
Conversation
…xt etc) The propagation loop was marking every non-PAR2 file as IsRarArchive=true when the NZB type was RarArchive, even files with no RAR magic bytes and no RAR extension (.txt, .nfo sidecars). These files were then routed to ProcessArchive and failed the import. Gate propagation on the file already being detected as an archive via the existing fileinfo.IsRarFile / Is7zFile functions or magic-byte detection (f.IsRarArchive / f.Is7zArchive). Extract into propagateArchiveType for testability. Reproducer: Fresh.Off.the.Boat.S01E12...playWEB.nzb — .txt sidecar was arriving at ProcessArchive.
|
btw, with ARR service engine set to off, I still see
|
Owner
Author
|
Ok will tackle that in another pr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
skip_arr_notificationboolean field (defaultfalse) to thePOST /import/filerequest body — callers that set it totruesuppress ARR notifications for that specific import{"skip_arr_notification":true}intoImportQueueItem.Metadatausing the existing JSON metadata pattern (same approach asnzbdav_id,extracted_files)HandleSuccessbefore callingnotifyARRWith; a skipped notification is logged at DEBUG withqueue_idandpathWhat changed
internal/api/types.goSkipArrNotification booladded toManualImportRequest(omitempty → backward-compatible)internal/api/import_handlers.goslogif marshal failsinternal/api/import_handlers_skip_arr_test.gointernal/importer/postprocessor/coordinator.goshouldSkipARRNotificationhelper +HandleSuccesswiringinternal/importer/postprocessor/coordinator_skip_arr_test.goHandleSuccessskip pathNo database migration needed — uses the pre-existing
Metadata *stringJSON field.Test Plan
go test ./... -racepasses (all packages green)POST /import/filewith"skip_arr_notification": false(or omitted) — ARR notification fires as beforePOST /import/filewith"skip_arr_notification": true— logsARR notification skipped (requested by caller)at DEBUG, no ARR scan triggered