NAME
irctor-queue - Log RTorrent actions to a file
DESCRIPTION
This program is meant to be called by RTorrent's event handlers. It logs actions to a log file based on the arguments it receives.
Optionally, when RTorrent tells it that a torrent has finished, irctor-queue can inspect the downloaded content and call unrar(1) in these situations:
The content is a single rar file. If the rar archive contains more than one file/directory, a directory will be created to contain them, with the same name as the archive without the ".rar" suffix)
The content is a directory with a rar archive that contains a single file/directory
The content is a directory containing CD[1-9] subdirectories which have rar archives (containing only a single file/directory each)
POE::Component::IRC::Plugin::RTorrentStatus follows the log file created by this program and announces various events on IRC.
CONFIGURATION
.rtorrent.rc must have the following lines in it. /tmp/torrentlog is the log file it will write to. Change it if you want to keep it elsewhere.
# irctor-queue hooks, with unrar
system.method.set_key = event.download.inserted_new,irctor_inserted_new,"execute=irctor-queue,/tmp/torrentlog,inserted_new,$d.get_name=,$d.get_size_bytes=1,$d.get_tied_to_file=1"
system.method.set_key = event.download.finished, irctor_finished, "execute=irctor-queue,/tmp/torrentlog,finished,$d.get_name=,$d.get_size_bytes=1,$d.get_tied_to_file=1"
system.method.set_key = event.download.erased, irctor_erased, "execute=irctor-queue,/tmp/torrentlog,erased,$d.get_name=,$d.get_size_bytes=1,$d.get_completed_bytes=1,$d.get_up_total=1,$d.get_ratio=1"
With unrar functionality
If wou want the unrar functionality, you must add the directory where your completed downloads are kept as an argument to irctor_finised
:
system.method.set_key = event.download.finished, irctor_finished, "execute=irctor-queue,/tmp/torrentlog,finished,$d.get_name=,$d.get_size_bytes=1,$d.get_tied_to_file=1,/home/foo/complete"
If you have an RTorrent hook which moves completed downloads to some directory, make sure the name of that hook comes before (according to ASCII sorting) the name of the irctor_finished
hook. This is necessary because RTorrent executes hooks in alphabetical order.
AUTHOR
Hinrik Örn Sigurðsson, hinrik.sig@gmail.com
LICENSE AND COPYRIGHT
Copyright 2010 Hinrik Örn Sigurðsson
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.