0

I have a crontab command that daily copies .iso files found within my torrents folder into an iso directory on a separate partition. My problem is that multiple .iso files will still be in the process of downloading when the crontab command executes which results in incomplete .iso files which obviously can cause issues when trying to use said .iso files.

Is there a bash command or module in python that can check whether a torrented file has been completely downloaded? Or possibly to query qbittorrent (my torrent client) to find whether the torrent has completed? Any help would be much appreciated.

  • 2
    I'm think most torrent applications have separate customizable directories for downloading files, completed downloads. Just poke around in preferences. I've never used your torrent app, but I'm pretty sure transmission (the default in Ubuntu) has this feature. – Alex Aug 7 '13 at 4:37
  • Thanks for the quick reply! I figured qbittorrent had that functionality but I must have skipped over it when searching for it. Still I am curious if there is a way to do this through bash or python for future use in scripts. – Bryan Aug 7 '13 at 4:43
  • 1
    Hi Bryan what you could do is the following: you could make a script that makes a checksum of the file at one point in time and then does the same a minute later. If the checksum is the same the file can be placed to the other partition (because it is done downloading). What do you think? – don.joey Aug 8 '13 at 18:36
  • That is actually quite clever. I like it. It would probably take an extreme case for this method not to work. Thanks for the help! – Bryan Aug 8 '13 at 19:12
1

As Alex suggested put completed torrents in another folder.

Beside check your if qbittorrent has a command line option to do a recheck.

Deluge for example has a "recheck" see: https://whatbox.ca/wiki/Deluge_Console_Documentation

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.