Files
MediaManager/media_manager/torrent
Lalit Patil 98f253238c Fix qBittorrent configuration and API response handling (#558)
## Summary
Fixes two critical qBittorrent issues reported in the original
repository:

- **Issue #546**: "Missing required parameters: savePath" - users forced
to manually configure category_save_path
- **Issue #547**: "Failed to download torrent, API-Answer isn't 'Ok.'" -
API response misinterpretation causing false failures

## Changes Made
- `media_manager/torrent/config.py`: Set proper default
`category_save_path` from `""` to `"/data/torrents"`
- `media_manager/torrent/download_clients/qbittorrent.py`: 
- Fixed API response check to handle `TorrentsAddedMetadata` objects
with `pending_count` or `success_count`
  - Use config `category_name` instead of hardcoded "MediaManager"

## Testing
These fixes address the root causes identified in both GitHub issues:
- Issue #546: Users can now use default configuration without manual
category_save_path setup
- Issue #547: Torrents that are "pending" (queued) are now correctly
recognized as successful additions

Resolves https://github.com/maxdorninger/MediaManager/issues/546
Resolves https://github.com/maxdorninger/MediaManager/issues/547

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

* **Bug Fixes**
* Improved detection of successful qBittorrent submissions by
recognising broader success indicators in API responses.

* **Improvements**
* Torrent downloads now honour user-configured category for correct file
organisation.
* Default torrent storage path set to /data/torrents to better match
containerised deployments and avoid misconfiguration.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-05 19:55:14 +02:00
..
2026-05-01 16:24:34 +02:00