Repository navigation
Conversation
…rce-subtitle-actions
…rce-subtitle-upgrades
…rce-subtitle-tools
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2a9943a6b4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| query = (select(audio).where(repository.Items.c.kind == kind) if kind == 'sports_event' | ||
| else wanted_list_items(kind, database, audio)) |
There was a problem hiding this comment.
Include completed source items in audio-language options
When an audio language exists only in source movies or episodes that already have all subtitles, it is omitted from the library's audio-language filter. wanted_list_items() requires nonempty missing_subtitles, an effective profile, and automatic-search eligibility, whereas the new Movies and Series library pages also display completed and untracked source items and populate their filter options from this endpoint. Query source audio languages independently of Wanted eligibility so those library items remain filterable.
Useful? React with 👍 / 👎.
| any: () => { | ||
| invalidateSourceWanted(); | ||
| invalidateSourceLibrary(); |
There was a problem hiding this comment.
Refresh Sports activity after source subtitle tools finish
When a sports source subtitle is translated through SourceSubtitleMenu, completion emits source-item/source-group, but these handlers invalidate only Series/Movies activity and source details—not the queries under QueryKeys.Sports. The completion refresh in refreshSourceSubtitleOwner() also omits Sports, and this translation path does not emit the separate source-sports event used by provider downloads. Consequently, returning to a recently cached Sports Wanted or History page can still show the translated language as missing or omit its history entry even though the badge has updated. Invalidate the source-inclusive Sports activity queries on these mutations as well.
Useful? React with 👍 / 👎.
| candidates = [_mapped_sql_path(path, [rule], reverse=True) for rule in mapper.rules] | ||
| alternatives = (model.path == candidate for candidate in candidates) | ||
| claim = sa.and_(sa.or_(claim, *alternatives), _mapped_sql_path(model.path, mapper.rules) == path) |
There was a problem hiding this comment.
Match Arr claims without requiring reversible path mappings
When the local mapping prefix also occurs in the original path's suffix, this reverse-mapping prefilter rejects a valid Arr owner. For example, mapping /downloads to /media maps /downloads/media/Film.mkv to /media/media/Film.mkv, but reversing the latter produces /downloads/downloads/Film.mkv because _mapped_sql_path() uses replace-all semantics. Neither alternative then matches the stored Arr path, despite its forward mapping matching exactly. Until the source's stored shadow is refreshed after an Arr import or mapping change, wanted_list_items() and wanted_language_count() therefore include the Arr-owned recording and double-count its missing subtitles. Use the forward-mapped equality without a reverse prefilter that assumes the mapping is invertible.
Useful? React with 👍 / 👎.
Include source-owned series and movies in the library pages and global search. Users can select the recording, correct its identity, manage subtitles and see source history alongside their connected libraries.
File mutations recheck ownership and settings before replacing or deleting a subtitle. The checks also cover an Arr instance gaining the recording while an action is running.