Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make single and multi-file AD torrents known to SymlinkDownloader #1

Conversation

Cucumberrbob
Copy link

Firstly, by setting Path to torrent.Filename if torrent.Links.Count == 1, when SymlinkDownloader checks the "" potentialFilePath, it will look for /mnt-path/<torrent.Filename> (which is where it will be).

Secondly, for the multi-file torrents, I've decided to just look directly at whatever directory the argument path specifies.

I'm a massive dotnet noob, so this may be non-idiomatic or approached wrong, but it does work for TestMultiple.torrent and Name Mismatch (Single File) (although rdt-client should probably error for this type of file since it's unreadable) .

I haven't implemented the erroring part when the single file is in a subdirectory - I'm not quite sure where should error. Since we know as soon as we get the /magnets/status response, we could error in AllDebridTorrentClient.GetTorrents - but we'd have to know that this was intended for the symlink downloader. Erroring in the SymlinkDownloader might make more sense?

…look for the file in this directory, in `ADTorrentClient`, use the torrent's `Filename` for the file's `Path` if there is only one file, and in `DownloadHelper`, return this if there's only one file in the torrent and it's an alldebrid torrent
@Sculas
Copy link
Owner

Sculas commented Jan 7, 2025

Superseded by 8fe277f and 38a3bc1 (rogerfar#648 (comment)). Thank you so much for your help in fixing the bug!

@Sculas Sculas closed this Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants