script-torrent-done after Verify

Discussion of Transmission that doesn't fit in the other categories
Post Reply
davep89
Posts: 2
Joined: Sat Dec 03, 2011 4:13 am

script-torrent-done after Verify

Post by davep89 »

Hi folks. Love your work.

I've been playing with Killemov's post torrent script and its wonderful and works well after a torrent completes. However Killemov made a comment that Transmission should run the script after a Verify as well but my install doesn't seem to want to do that! And I can't find anywhere that says it should.

So should my install run the post torrent script after a Verify?

Thanks.

David
killemov
Posts: 573
Joined: Sat Jul 31, 2010 5:04 pm

Re: script-torrent-done after Verify

Post by killemov »

davep89 wrote:So should my install run the post torrent script after a Verify?
Hey David, NO, with my specific script that is not necessary. The unrar action fails on bad data and the script then commands transmission to perform a verification. This will go into an infinite loop if the torrent actually contains bad rar data. (I have encountered this only once.)
davep89
Posts: 2
Joined: Sat Dec 03, 2011 4:13 am

Re: script-torrent-done after Verify

Post by davep89 »

HI Killemov. Thanks for your response, and for the script!

The reason I asked the question is that I am fiddling with the script to add some post unpack processing and I can't think how to test my changes other than to do another download so I am ending up with lots of rubbish! If I could initiate the script in another way with the environment variables intact it would be very handy.

I thought that a manual Verify might do that. Any suggestions?

David
blacke4dawn
Posts: 552
Joined: Sun Dec 13, 2009 10:44 pm

Re: script-torrent-done after Verify

Post by blacke4dawn »

You can call it manually by running it in a shell and just exporting the variables it needs. I did just that when testing out the changes I presented.
killemov
Posts: 573
Joined: Sat Jul 31, 2010 5:04 pm

Re: script-torrent-done after Verify

Post by killemov »

Code: Select all

...
      unrar x -inul "$RAR_FILE" "$DEST_DIR"
          if [ $? -gt 0 ]; then
             # The unrar failed, so bad data.
          else
             # The unrar passed, so good data.
          fi
...
As for testing: You should first test the post unrar actions on static unrarred test data before integrating those actions.
killemov
Posts: 573
Joined: Sat Jul 31, 2010 5:04 pm

Re: script-torrent-done after Verify

Post by killemov »

I recently increased the cache-size-mb and encountered some more corruption. Could it be that the cache isn't flushed and synced to disk before the torrent is marked as complete?
blacke4dawn
Posts: 552
Joined: Sun Dec 13, 2009 10:44 pm

Re: script-torrent-done after Verify

Post by blacke4dawn »

What corruption are you talking about here, the compressed archives them self? If so then a much more likely reason is that the archive was sent out corrupt and there is nothing for them to do to correct it.
killemov
Posts: 573
Joined: Sat Jul 31, 2010 5:04 pm

Re: script-torrent-done after Verify

Post by killemov »

No, with ANY type of torrent content. Torrent done -> verify -> Ah, the torrent was apparently only 99.95% done. Using version 2.33.
blacke4dawn
Posts: 552
Joined: Sun Dec 13, 2009 10:44 pm

Re: script-torrent-done after Verify

Post by blacke4dawn »

Then the corruption somehow happened after it was first verified, might be a bad sector on the HDD or something else got "messed up" in it all. If it happens frequently then I would suspect the HDD.
Post Reply