Add scoring rule evaluation for custom search#499
Add scoring rule evaluation for custom search#499juandbc wants to merge 1 commit intomaxdorninger:masterfrom
Conversation
📝 WalkthroughWalkthroughThese changes modify the database configuration and update search query handling in the movie and TV service modules. When search overrides are provided, the services now use a generalized search function instead of specific indexer methods, preserving fallback behaviour for standard queries. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 Tip CodeRabbit can use your project's `ruff` configuration to improve the quality of Python code reviews.Add a Ruff configuration file to your project to customize how CodeRabbit runs |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@config.dev.toml`:
- Line 33: The database host in config.dev.toml is set to "postgres" but the dev
docker-compose service is named "db", causing a mismatch; update the host value
for the DB connection (the host key in config.dev.toml) from "postgres" to "db"
so it matches the docker-compose.dev.yaml service name and restores
connectivity.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 11f51d91-1a94-4d03-83a9-7f6c85bd4217
📒 Files selected for processing (3)
config.dev.tomlmedia_manager/movies/service.pymedia_manager/tv/service.py
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: build-and-push (arm64, ubuntu-24.04-arm)
- GitHub Check: build-and-push (amd64, ubuntu-24.04)
🔇 Additional comments (3)
config.dev.toml (1)
175-175: No functional concern here.This URL line appears semantically unchanged; this looks like a formatting-only edit.
media_manager/movies/service.py (1)
214-220: Good change: override and default movie searches now converge before scoring.Both paths now return results that are passed through
evaluate_indexer_query_results(Lines 221-223), so custom search overrides receive the same scoring treatment as standard searches.media_manager/tv/service.py (1)
215-222: Nice fix: season override flow now mirrors normal flow semantics.The override branch uses generic search, while the default path keeps season-specific search; both continue through season filtering and scoring evaluation, which addresses the reported custom-search scoring gap.
|
|
||
| [database] | ||
| host = "db" | ||
| host = "postgres" |
There was a problem hiding this comment.
Database host no longer matches the default dev Compose service key.
docker-compose.dev.yaml defines the PostgreSQL service as db, but this config now points to postgres. That mismatch can break DB connectivity in the default dev stack.
Suggested fix
[database]
-host = "postgres"
+host = "db"
port = 5432
user = "MediaManager"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| host = "postgres" | |
| [database] | |
| host = "db" | |
| port = 5432 | |
| user = "MediaManager" |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@config.dev.toml` at line 33, The database host in config.dev.toml is set to
"postgres" but the dev docker-compose service is named "db", causing a mismatch;
update the host value for the DB connection (the host key in config.dev.toml)
from "postgres" to "db" so it matches the docker-compose.dev.yaml service name
and restores connectivity.
Fixes #498
Summary by CodeRabbit
Chores
Refactor