Mapping of AniWorld Specials/Extras/"Filme" to Sonarr#56
Conversation
- Introduced detailed documentation outlining the current state and evidence for handling AniWorld specials/extras. - Added options comparison for different strategies to improve title-based searches. - Provided a recommended design for integrating AniWorld specials with Sonarr's request behavior. - Included an implementation checklist to guide future development phases.
add functionality for resolving special episode mappings from queries and requests. This includes enhancements to the API for handling specials, integrating with AniWorld's metadata, and caching mechanisms for improved performance.
implement logic to use title hint as a release name override in the download_episode function, enhancing the flexibility of the download process.
📝 WalkthroughWalkthroughAdds metadata-backed AniWorld specials mapping: new provider module with caching and matching, new SPECIALS_* config flags, Torznab API ID hints and special-search integration, downloader release-override propagation, documentation updates, and tests for parsing, mapping, Torznab integration, and downloader behavior. Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Torznab Client
participant TorznabAPI as Torznab API
participant Specials as Specials Module
participant AniWorld as Aniworld (HTTP)
participant SkyHook as SkyHook/TVDB
participant Cache as TTL Cache
participant RSS as RSS Generator
Client->>TorznabAPI: GET /torznab/api?q=...&tvdbid=...&season=0&ep=4
TorznabAPI->>Specials: _handle_special_search(q, ids, limit)
Specials->>Cache: check slug & show payload
alt cache hit
Cache-->>Specials: entries + payload
else
Specials->>AniWorld: fetch_filme_entries(slug)
AniWorld-->>Specials: AniworldSpecialEntry list
Specials->>SkyHook: resolve show/episodes (by IDs/title)
SkyHook-->>Specials: episode payload
Specials->>Cache: store entries/payload
end
Specials->>Specials: compute best SpecialEpisodeMapping
Specials-->>TorznabAPI: mapping or None
alt mapping found
TorznabAPI->>RSS: build item(s) with mapped source/alias S/E, magnet/STRM, GUID metadata
else
TorznabAPI->>TorznabAPI: proceed with existing preview/fallback search
end
RSS-->>Client: RSS feed with items
Estimated Code Review Effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Repository UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used📓 Path-based instructions (3)app/**📄 CodeRabbit inference engine (.github/instructions/Next.js-Tailwind-Development-Instructions.instructions.md)
Files:
**/*.py📄 CodeRabbit inference engine (.github/instructions/Performance-Optimization-Best-Practices.instructions.md)
Files:
**/*.{js,jsx,ts,tsx,py,java,cs}📄 CodeRabbit inference engine (.github/instructions/Performance-Optimization-Best-Practices.instructions.md)
Files:
🧠 Learnings (1)📚 Learning: 2025-10-10T20:57:55.343ZApplied to files:
🧬 Code graph analysis (2)app/providers/aniworld/specials.py (4)
tests/test_torznab_specials_mapping.py (3)
🔇 Additional comments (13)
✏️ Tip: You can disable this entire section by setting 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 |
Add support for movie queries in the Torznab API, including new query parameters for optional ID hints. Update documentation to reflect changes in specials/extras handling for AniWorld, ensuring consistency in Sonarr alias numbering.
This change updates multiple API documentation files to include the hide-branding attribute for the ApiOperations component, ensuring a consistent appearance across the documentation.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
anibridge-docs | 2bb4a3c | Feb 10 2026, 07:48 PM |
This comment was marked as resolved.
This comment was marked as resolved.
Docstrings generation was requested by @Zzackllack. * #56 (comment) The following files were modified: * `app/api/torznab/api.py` * `app/core/downloader/download.py` * `app/core/downloader/episode.py` * `app/providers/aniworld/specials.py` * `tests/test_downloader_episode.py` * `tests/test_torznab_specials_mapping.py` * `tests/test_torznab_utils.py`
…probes Reuse resolved specials mapping across tvsearch language iterations to avoid re-probing the originally requested episode for every language. Keep GUIDs stable by appending alias suffixes only when alias and source coordinates differ, and skip special-search resolution work when metadata mapping is disabled. Normalize downloader release override handling so empty STRM-only title hints produce `None` instead of an empty string. Handle AniWorld `/filme` 404 as a valid "no specials" case and cache the empty result. Refactor AniWorld specials matching internals by extracting shared resolver context, adding named scoring/threshold constants, documenting public entry points/dataclasses, and adding bounded TTL cache pruning under lock. Update tests to use a shared `aniworld.parser` fixture with monkeypatch-based `sys.modules` isolation, add regressions for GUID suffix behavior, multi-lang probe reuse, downloader override normalization, and 404 specials handling. Update docs for Sonarr/Torznab troubleshooting and API guidance, including line-wrap fixes to follow markdown readability guidelines.
Introduces a new function to probe mapped AniWorld special coordinates, utilizing cache first and then performing a live probe if necessary. This improves the reliability of availability checks for specials. Also updates the existing code to utilize this new function, reducing redundancy and improving clarity.
Description
This pull request introduces metadata-backed mapping for "specials" episodes in the AniWorld provider, improving support for Sonarr and similar clients by enabling more accurate episode matching and search. The changes add new query parameters, implement special mapping logic for both search and episode requests, and expose configuration options for the feature. Additionally, the downloader logic is updated for improved robustness.
Type of Change
Testing
Screenshots (if applicable)
Additional Notes
Metadata-backed specials handling:
SpecialIdsand special mapping logic to support metadata-backed specials matching, including new_handle_special_searchfunction and integration into the main Torznab API flow. This enables more accurate mapping of requested episodes to AniWorld's specials, returning results with Sonarr-style aliases. [1] [2] [3]API enhancements:
tvdbid,tmdbid,imdbid,rid,tvmazeid) to the Torznab API, allowing clients to specify external IDs for improved matching. Logging and supported parameter lists were updated accordingly. [1] [2] [3]Configuration:
Downloader robustness:
release_overrideis set only once and added checks forseasonandepisodebeing non-None when generating filenames, preventing potential errors. [1] [2] [3] [4]Summary by CodeRabbit
New Features
Improvements
Documentation
Tests