rdt-client/server/RdtClient.Service/Services
Claude 1098bac18f
feat: strip problematic characters from downloaded filenames
Downloads fail on Linux containers when filenames contain square
brackets or multiple consecutive spaces. On Linux, .NET's
Path.GetInvalidFileNameChars() only returns NUL and '/', so characters
like [ ] { } that cause issues with shell globbing, URI handling, and
various download clients pass through the existing filter unchanged.

Add FilenameSanitizer that:
- Strips square brackets, curly braces, and control characters
- Collapses multiple consecutive spaces into one
- Trims leading and trailing whitespace
- Preserves parentheses and all other characters

Apply sanitization at filesystem boundaries: DownloadHelper (where the
Real-Debrid filename is turned into a local path), UnpackClient,
Torrent delete / RunOnTorrentComplete, and the qBittorrent / SABnzbd
status paths that *arr reads back. Aria2c and DownloadStation also
sanitize their remote output paths so they match the sanitized local
filePath. Symlink's rclone-mount lookup still uses the original name
since that has to match the real file in the mount.

Add a SanitizeFilenames toggle in DbSettings (default on) so users
can disable the behaviour if they need the exact Real-Debrid name.
2026-04-23 06:19:25 +00:00
..
DebridClients Run formatters. 2026-03-14 13:41:30 -06:00
Downloaders Global formatting. 2026-02-11 19:44:49 -07:00
Authentication.cs Usenet support 2026-02-13 13:15:57 -05:00
DownloadableFileFilter.cs Global formatting. 2026-02-11 19:44:49 -07:00
DownloadClient.cs feat: strip problematic characters from downloaded filenames 2026-04-23 06:19:25 +00:00
Downloads.cs Global formatting. 2026-02-11 19:44:49 -07:00
Enricher.cs Global formatting. 2026-02-11 19:44:49 -07:00
IDownloads.cs Use richer GetDownloadInfos instead of GetDownloadLinks 2025-03-11 12:12:16 +00:00
ITrackerListGrabber.cs Global formatting. 2026-02-11 19:44:49 -07:00
QBittorrent.cs feat: strip problematic characters from downloaded filenames 2026-04-23 06:19:25 +00:00
RdtHub.cs Global formatting. 2026-02-11 19:44:49 -07:00
RemoteService.cs Cleanup. 2026-02-23 20:04:53 -07:00
Sabnzbd.cs feat: strip problematic characters from downloaded filenames 2026-04-23 06:19:25 +00:00
Settings.cs Global formatting. 2026-02-11 19:44:49 -07:00
TorrentRunner.cs Run formatters. 2026-03-14 13:41:30 -06:00
Torrents.cs feat: strip problematic characters from downloaded filenames 2026-04-23 06:19:25 +00:00
TrackerListGrabber.cs Global formatting. 2026-02-11 19:44:49 -07:00
UnpackClient.cs feat: strip problematic characters from downloaded filenames 2026-04-23 06:19:25 +00:00