Init() created a new SynologyClient and logged in for every download. A many-file download opened dozens of near-simultaneous sessions for one DSM account; DSM invalidates older session IDs, so in-flight File Station calls failed with error 119 "SID not found". Add SynologyClientProvider: a thread-safe cache that authenticates once and shares the client across downloads (concurrent first calls collapse to a single login; later calls reuse it; a credential change re-authenticates). Wrap every Synology call in a session-retry that drops the session and re-authenticates once on a session error (119/106/107) so an expired SID self-heals, reading credentials fresh from settings so edits take effect live. Adds provider unit tests and a downloader test covering the 119 re-auth path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| Downloaders | ||
| TorrentClients | ||
| DownloadableFileFilterTest.cs | ||
| EnricherTest.cs | ||
| NzbTorrentsTest.cs | ||
| QBittorrentTest.cs | ||
| SabnzbdTest.cs | ||
| TorrentRunnerTest.cs | ||
| TorrentsTest.cs | ||