You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR is currently marked as draft as in its current state it won't work well with TorBox and I haven't tested with anything other than AD so there may be other issues.
I'd like to also fix #336 and use the AD "Save Link" feature for .strm downloads
TorBox really should use the redirect=true links since the unrestricted ones only last a few hours.
I don't know about quirks of DL or PM yet.
• Implement ability to download physical .strm files instead of full video files
• Create a separate internal download client for .strm files
• Handle .strm files exactly like video files (same download process)
Requires further human verification:
• Remove torrent from client and provider post download
• Support Sonarr handling the import of .strm files
• Enable removal of downloads from RD library after download
• Eliminate overhead of managing mounting rclone share
The Download method returns a random GUID string which doesn't represent any meaningful download identifier or status, potentially breaking expected behavior for callers expecting a proper download ID or path.
No validation is performed on the downloadLink parameter before writing to file, which could result in invalid .strm files if the link is malformed or empty.
The code doesn't validate if the downloadLink is a valid URL before writing it to the file. Adding URL validation would prevent creating invalid .strm files that media players cannot process.
+if (!Uri.TryCreate(downloadLink, UriKind.Absolute, out _))+{+ throw new ArgumentException($"Invalid download link: {downloadLink}");+}+
await fileSystem.File.WriteAllTextAsync(filePath + ".strm", downloadLink);
Apply / Chat
Suggestion importance[1-10]: 7
__
Why: This is a good suggestion for improving the robustness of the StrmDownloader. Validating that the downloadLink is a valid URL before writing it to a .strm file prevents creating corrupt files and allows for earlier, more specific error reporting. The implementation using Uri.TryCreate is correct.
Medium
Return meaningful file path value
The method returns a random GUID regardless of success or failure, which doesn't provide meaningful information about the download operation. Consider returning the actual file path on success or null/empty string on failure to make the return value more informative.
Why: The suggestion correctly identifies that returning a random GUID from the Download method is not very informative. Proposing to return the created file path on success and an empty string on failure makes the method's return value more useful for the caller, which is a good design improvement.
@Cucumberrbob makes sense, you think this is good to put in as a beta?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #838
Adds a new downloader: the
.strmdownloader.This PR is currently marked as draft as in its current state it won't work well with TorBox and I haven't tested with anything other than AD so there may be other issues.
I'd like to also fix #336 and use the AD "Save Link" feature for
.strmdownloadsTorBox really should use the
redirect=truelinks since the unrestricted ones only last a few hours.I don't know about quirks of DL or PM yet.