Commit Graph

17 Commits

Author SHA1 Message Date
Maximilian Dorninger
f5253990e0 switch from APScheduler to Taskiq (#461)
This PR replaces the APScheduler lib with the Taskiq task queuing lib. 

# why

APScheduler doesn't support FastAPI's DI in tasks, this makes them quite
cumbersome to read and write since DB, Repositories and Services all
need to be instanciated manually.

Moreover, Taskiq makes it easier to start background tasks from FastAPI
requests. This enables MM to move to a more event-based architecture.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* App now uses an orchestrated async startup/shutdown and runs
background scheduling via a database-backed task queue; startup enqueues
pre-load/import/update tasks.

* **Bug Fixes**
* Improved torrent client handling with clearer conflict messages and
guidance for manual resolution.
* Enhanced logging around season, episode and metadata update
operations; minor regex/behaviour formatting preserved.

* **Chores**
* Updated dependencies to support the new task queue and connection
pooling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-26 21:23:24 +01:00
Juan David Bermudez Celedon
cbd70bd6f3 Fix scoring rules keyword matching (#473)
Fixs for #460 

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

## Release Notes

* **Improvements**
* Refined keyword matching in indexer queries with case-insensitive,
word-boundary-aware search for more accurate results.

* **Bug Fixes**
  * Corrected torrent URL redirect resolution logic.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-26 16:37:29 +01:00
Marcel Hellwig
96b84d45db Adding some more new lints (#393)
Enable `UP` and `TRY` lint
2026-02-01 18:04:15 +01:00
Maximilian Dorninger
a39e0d204a Ruff enable type annotations rule (#362)
This PR enables the ruff rule for return type annotations (ANN), and
adds the ty package for type checking.
2026-01-06 17:07:19 +01:00
Marcel Hellwig
97cb3b5c1e ruff: enable EM lint 2026-01-05 19:30:42 +01:00
maxid
40130c6a37 refactor: rename AllEncompassingConfig to MediaManagerConfig 2025-12-29 23:38:17 +01:00
maxid
4f74a5bee6 improve logging of evaluation of IndexerQueryResults 2025-12-28 23:41:41 +01:00
maxDorninger
571dcd1cf8 rework follow_redirects_to_final_torrent_url(); prevent infinite, or at least very long, loops by setting a max redirect count of 10 2025-10-30 18:05:52 +01:00
maxDorninger
790eca9858 speed up torrent searching by multithreading it and using the same requests session everywhere 2025-10-30 16:20:06 +01:00
maxDorninger
c8d0ec2a5f raise Runtime error instead of returning None when final url could not be determined 2025-07-30 22:37:57 +02:00
Maximilian Dorninger
6c20f7f026 Update media_manager/indexer/utils.py
use redirect_url instead of final_url

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-30 22:34:45 +02:00
Maximilian Dorninger
e2c65c9231 Update media_manager/indexer/utils.py
use redirect_url instead of final_url

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-30 22:34:37 +02:00
maxDorninger
9c84e04de2 make prowlarr follow redirects for every url 2025-07-30 22:29:30 +02:00
maxDorninger
a230fcaa43 fix logic of evaluate_indexer_query_results 2025-07-17 12:31:12 +02:00
maxDorninger
dcf3d1907a add proper logging to the Indexer query result evaluation functions 2025-07-17 11:37:35 +02:00
maxDorninger
c4db283c63 add evaluate_indexer_query_results function to process query results based on scoring rules and use this function in tv and movie modules 2025-07-17 00:29:30 +02:00
maxDorninger
d01e5f5ee2 add scoring rules to config and add evaluate indexer query result function 2025-07-16 23:23:15 +02:00