Repository navigation
Conversation
…ield to series snapshot
…s to use typed Series snapshot
mjc
force-pushed
the
share-arr-codec-mappings
branch
from
October 21, 2026 14:47
48ed69f to
c66f82f
Compare
mjc
marked this pull request as draft
October 21, 2026 16:50
mjc
force-pushed
the
share-arr-codec-mappings
branch
from
October 21, 2026 22:59
c66f82f to
d058254
Compare
Validate JSON directly into slotted dataclasses. Preserve strict fields, scalar conversions, incomplete records and Requests JSON error handling, and replace the msgspec dependency with the vendored Pydantic version.
Search for nonstandard number literals before checking their separators. Avoid a full-buffer regex scan and keep titles containing Infinity or NaN on the typed decoder path.
Probe the selected Requests JSON parser once. Keep the compatibility check for rejecting backends and avoid scanning response buffers when both parsers accept nonstandard numbers.
Keep numeric-string and float conversions as fallbacks. Share byte-count conversion with incomplete movie recovery and cover large integers and floating-point truncation.
Validate movie recovery facts directly, use native defaults for invalid fields and payloads, and avoid reparsing JSON after record validation fails. Keep overview strings on the native validation path.
Keep at most 128 argument combinations per codec function and remove the extra handler calls and encoder loop. Preserve case-insensitive matching, unknown values, and metadata precedence. Cover Unicode matching and cache eviction.
Use one bounded cache lookup per episode file. Keep the individual normalization rules and cover mixed, missing, and unknown codec pairs.
mjc
force-pushed
the
share-arr-codec-mappings
branch
from
October 22, 2026 17:23
dbb4ea8 to
4d05b72
Compare
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.
This, like the others, depends on the previous PRs so it looks huge. it's like +471-121, where 195 of those added lines are exhaustive property tests.
--
Move Sonarr and Radarr codec normalization into one module. Both parsers use shared alias and encoder tables, with separate handlers for Radarr’s metadata-dependent mappings. Remove the old converter modules.
Match codec names and supporting metadata without regard to case. Keep unknown codec strings unchanged, and preserve the existing results when Radarr metadata is missing or cannot identify a codec.
Tests cover aliases, nullable inputs, audio metadata combinations, MPEG layer precedence, video encoder prefixes and suffixes, and unknown Unicode names. Generated compatibility properties preserve the existing mappings; separate properties cover case-insensitive matching, including every casing combination of Sonarr’s known aliases, prefixes and suffixes.
Nearly all of these tests were based on the original code - the only thing that should have changed is that it now is case insensitive.