Commit Graph

23 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
Maximilian Dorninger
7824891557 Fix qbittorrent category error (#456)
This PR fixes an error caused by MM trying to set the category save path
to None if the string is empty.
2026-02-22 19:51:10 +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
75406cbc64 ruff: add RET lint
lints about assign and immediatly returning a variable
2026-01-05 19:30:42 +01:00
Marcel Hellwig
29476e2008 ruff: enable INT and N lint
this renames some files to use snake_case and add Error suffix to custom
exceptions
2026-01-05 19:30:42 +01:00
Marcel Hellwig
ff013ac76e ruff: enable I lint 2026-01-05 19:30:42 +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
9e6851d055 remove unnecessary logs in the torrents module 2025-12-29 11:43:35 +01:00
Maximilian Dorninger
4a3dea3cab Update media_manager/torrent/download_clients/qbittorrent.py
initialize answer instead of marking it with global

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-27 15:03:02 +02:00
maxDorninger
c56aebd85d extract logic for downloading torrent file and parsing the magnetlink/torrent file into separate function 2025-07-27 14:42:26 +02:00
Maximilian Dorninger
64873d9eee Update media_manager/torrent/download_clients/qbittorrent.py
Remove duplicate 'moving' state from DOWNLOADING_STATE tuple.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-26 10:04:24 +02:00
maxDorninger
97d0e140b7 add undocumented states to qbittorent's DOWNLOADING_STATE and FINISHED_STATE 2025-07-25 19:24:50 +02:00
maxDorninger
7c9b8d53fd fix qbittorrent not being able to initialize due to error when trying to update the Qbittorrent category 2025-07-25 19:23:56 +02:00
maxDorninger
3e5f43a5d3 make qbittorrent category save path and name customizable 2025-07-22 17:54:25 +02:00
maxDorninger
b3c762040d add support for transmission 2025-07-15 19:56:46 +02:00
maxDorninger
be1dc0d03b fix qbittorrent client initialisation failing 2025-07-13 00:58:42 +02:00
maxDorninger
9db9c85fc6 make all var names lower case and fix circular imports 2025-07-11 00:47:29 +02:00
maxDorninger
7ce6de7f85 replace all the other config usages with allencompassing config 2025-07-10 22:25:05 +02:00
maxDorninger
1b784c35c1 add allencompassing config, replace basic config usage with allencompassing config usage 2025-07-10 21:47:37 +02:00
maxDorninger
28349641c0 format files 2025-07-09 23:56:34 +02:00
maxDorninger
5fd563944f extracting qbittorrent logic into separate class 2025-07-09 23:10:53 +02:00