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

[Question] Doesn't work with partially downloaded torrents? #13

Closed
deepfriedmind opened this issue Sep 28, 2016 · 4 comments
Closed

[Question] Doesn't work with partially downloaded torrents? #13

deepfriedmind opened this issue Sep 28, 2016 · 4 comments

Comments

@deepfriedmind
Copy link

I tried using this on a partially downloaded torrent (i.e. a season pack of a TV show with some episoded set to "Do Not Download"). It seems that the plugin tries to operate on all the files, wether they are downloaded or not, which throws an error for the files not present on disk.

Is it possible to make it check for the actual downloaded files instead of all the files listed in the torrent? If it's not possible to determine wether the files are actually on disk or not, maybe it could see which ones are set to "Do Not Download" and skip those?

Also, even when marking a file as "Do Not Download" – Deluge might download a small piece of the file anyway because of how the BitTorrent protocol works (i.e. downloading a piece that belongs to 2 files). With this in mind, it would be great if the plugin could also skip files that are under a certain size (even if they have the extension of a media file), say 1MB or whatever the maximum viable piece size is nowadays. (this wouldn't be a problem if Deluge had an option for appending a ".part" extension to incomplete files, like e.g. Transmission, or if it could clean up unwanted files when the download is finished and before FileBotTool is run)

@Laharah
Copy link
Owner

Laharah commented Sep 28, 2016

Well, I could, in theory, check for skipped files before adding them to the list of targets. It would keep them from being renamed, so if they were downloaded in the future, filebot would have to be re-run. I'm not sure if auto-sort will work if a torrent has files marked to be skipped though. It depends on if deluge emits a torrent_finished event when all non-skipped files are completed.

I don't think I can safely skip small files though, it would run into issues with correctly re-naming subtitle and media info files. Same with the cleanup, a partially downloaded file is still part of the torrent's checksum, and I try not to let the plugin violate torrent integrity for any reason. It's one of the reasons I haven't implemented the extract option from issue #8 yet.

I'll look into the handling of skipped files later tonight and come back to this.

Laharah added a commit that referenced this issue Sep 29, 2016
@Laharah
Copy link
Owner

Laharah commented Sep 29, 2016

I've added provisional support for skipping do not download marked files. I'm not 100% that there aren't edge cases I haven't thought of, but it should work in general.

@deepfriedmind
Copy link
Author

So far it's working excellently, thanks!

@Laharah
Copy link
Owner

Laharah commented Sep 30, 2016

glad to hear it!

@Laharah Laharah closed this as completed Sep 30, 2016
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

No branches or pull requests

2 participants