I needed this two a few weeks ago and because of the wonder that is
open source software, I was able to just implement it myself!
Basically, you will just be modifying rtgui to save the .torrent in a
specific directory. You will also need to modify your rtorrent
configuration to add an additional watch directory.
For more information on setting up a second watch directory, check
out:
http://libtorrent.rakshasa.no/wiki/RTorrentCommonTasks#Watchadirectoryfortorrents
On this page, look for the line:
# Watch another directory with a different destination. (0.7.7+)
Once you have that setup, you can modify a bit of the rtgui code to
add this little checkbox. When "mp3?" is checked, it will save the
torrent to my mp3 subdirectory, like so:
http://fletchowns.net/rtgui_patch/rtgui_directory.png
Open up index.php, find the line:
echo "File: <input name='uploadtorrent' type='file' size=25 /> <input
type='submit' value='Go' />\n";
Replace it with:
echo "File: <input name='uploadtorrent' type='file' size=25 /> mp3?
<input name='ismp3' type='checkbox'/> <input type='submit' value='Go' /
>\n";
Now open up control.php and locate this chunk of code:
// Upload torrent file...
if (isset($r_uploadtorrent)) {
if ($_FILES['uploadtorrent']['name']!="") {
$tmpfile=$_FILES['uploadtorrent']['name'];
if (move_uploaded_file($_FILES['uploadtorrent']['tmp_name'],
$watchdir.basename($_FILES['uploadtorrent']['name']))) {
chmod($watchdir.basename($_FILES['uploadtorrent']['name']),
0777);
header("Location: index.php");
} else {
echo "Error moving file - check permissions etc! <a
href=index.php>Continue</a>.\n";
}
die();
}
}
And replace it with this:
// Upload torrent file...
if (isset($r_uploadtorrent)) {
if ($_FILES['uploadtorrent']['name']!="") {
$tmpfile=$_FILES['uploadtorrent']['name'];
$directory = $watchdir;
if ($_POST['ismp3'] == "on")
$directory .= "mp3/";
$directory .= basename($_FILES['uploadtorrent']['name']);
if (move_uploaded_file($_FILES['uploadtorrent']['tmp_name'],
$directory)) {
chmod($watchdir.basename($_FILES['uploadtorrent']['name']),
0777);
header("Location: index.php");
} else {
echo "Error moving file - check permissions etc! <a
href=index.php>Continue</a>.\n";
}
die();
}
}
Basically, this checks to see if our "ismp3" checkbox we added is
checked, and then it sets the download directory accordingly.
Hope this helps! Shouldn't be too hard to add as many checkboxes as
you would like from here.