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
Files become "stuck" in download client when a better download is queued while original file is downloading #6641
Comments
What are hit and runs? Edit: I looked up the definition. I believe that the requirement for the torrent to be paused will prevent that issue? Assuming people have the "delete an imported download after pausing" box checked, then it's fair to assume that they've set up their pausing logic correctly. Or is there something else I'm missing? |
Yes, only deleting when paused would overcome the H&R aspect of it. Just being paused and grabbed before another download could still remove something that the user didn't want it to though, so there needs to be more safeguards than that, especially when we're talking about data that hasn't been imported. |
Ah, thanks for the response! What's a scenario where something might be removed that the user didn't want removed? If the first download had just completed and imported before the second download started, then the end state after download 2 finishes and imports would be the same as the change I'm proposing. Oh maybe a little different: if the user has a trash directory, we would want to make sure the deleted download goes into the trash directory as if it had been imported I suppose. |
I'm not sure offhand, but there are many reasons why something could be rejected that aren't "not an upgrade". You could also potentially have the reverse problem, a file is grabbed because it's seen as an upgrade (usually because the indexer says it's X), but at import time it get stuck because it's actually Y. Moving to trash could work, but in a seedbox scenario that could take a considerable amount of time and block other imports. There are a lot of edge cases that could arise and lead to issues. |
Perhaps an option for "removing" for torrents is having a removal category (like post import), that way it's not stuck in Sonarr's queue, but Sonarr doesn't force the deletion either. For Usenet moving to a different folder and removing from history could be viable. |
I agree, this is a real issue and is annoying. And it's similar to the scenario in the post, but I think it's different enough to not need to be addressed by the solution to this specific problem where queueing time leads to stuck downloads |
What do you mean? Like Sonarr will not auto-delete ever? Or Sonarr will not auto-delete until certain conditions are met (paused, etc)? |
Two things:
|
Is there an existing issue for this?
Is your feature request related to a problem? Please describe
Sometimes, an initial download (A) is grabbed. While A is downloading but before A has been imported, a second, better download (B), is grabbed. What ends up happening is B gets imported, and A is stuck in a state where it's downloaded, but unable to import, and unable to be deleted.
Not a Custom Format upgrade for existing episode file(s)
Describe the solution you'd like
I imagine that Sonarr already has auto-deletion logic that looks something like:
I am suggesting that logic be added to like so:
I think this would solve the problem that I'm having, since download A was queued before download B. It makes sense that download B was queued, since Sonarr thinks it's an upgrade over download A. But that also means that download A should now be in a "ready to be deleted" state, since download B is now the "primary download".
I still believe that paused logic should be respected. Downloads should not be deleted if they are not paused in the download client. This should help prevent deleting downloads before seeding requirements are met.
I also don't believe that this logic will lead to download loops, though I am likely not aware of all the possible edge cases that this code will run through that might lead to unwanted behavior.
Describe alternatives you've considered
Adding a delay to the download grabs.
Cons:
Pros:
Anything else?
No response
The text was updated successfully, but these errors were encountered: