If you open a new thread i'll try to help you.
Printable View
Im sorry for the stupid question... but where am I suposed to copy this code? :confused:
I extended your script a bit. Also using some stuff from other sources, particularly the transmissionbt-wiki.
It now does the following:
-Remove torrents that are finished and done seeding (or just sit around idle).
-Move completed torrents to download dir.
-Add new torrents from torrent-folder, given there is space left in the dl queue.
Did I forget anything?? Without the need to seed, this would be simpler, but we wanna be got bt-citizens after all...
I'm still testing this. use at your own risk.Code:#!/bin/sh
# *************
REMOTE="/usr/local/bin/transmission-remote"
DESTDIR=/media/Finished
TORRENTDIR=/media/Torrents
MAXACTIVE="6"
USER=xx
PASS=xx
# *************
# Clean up after rsync
find $DESTDIR -mindepth 1 -type d -empty | xargs -I {} -i rmdir "{}"
# Remove Finished and Inactive
FINISHED="$($REMOTE -l -n $USER:$PASS | tail --lines=+2 | grep 100% | grep "Stopped\|Idle" | awk '{ print $1; }')"
for i in $FINISHED; do
echo Torrent No. $FINISHED is finished and inactive.
LOCATION=`$REMOTE -n $USER:$PASS -t $i -i | awk '/Location/'|sed -e 's/ Location: //'`
if [ $LOCATION = $DESTDIR ]; then
echo "Files have been moved already. Just deleting."
$REMOTE -n $USER:$PASS -t $i -r
else
echo "Moving No. $i to download-folder."
$REMOTE -n $USER:$PASS -t $i --move $DESTDIR && chmod -R 777 $DESTDIR && $REMOTE -n $USER:$PASS -t $i -r
echo Removed $i from queue.
fi
done
# Move Finished
FINISHED="$($REMOTE -l -n $USER:$PASS | tail --lines=+2 | grep 100% | awk '{ print $1; }')"
for i in $FINISHED; do
echo Torrent No. $i is finished.
LOCATION=`$REMOTE -n $USER:$PASS -t $i -i | awk '/Location/'|sed -e 's/ Location: //'`
if [ $LOCATION = $DESTDIR ]; then
echo "Files have been moved already"
else
echo "Moving No. $i to download-folder."
$REMOTE -n $USER:$PASS -t $i --move $DESTDIR && chmod -R 777 $DESTDIR
fi
done
# Add new torrents and delete source file.
ACTIVE="$[ $($REMOTE -n $USER:$PASS -l | grep -v Stopped | wc -l) - 2 ]"
echo $ACTIVE active torrents.
if [ $ACTIVE -ge $MAXACTIVE ]; then
echo Queue full.
exit 0
else
until [ $ACTIVE = $MAXACTIVE ] || [ $(ls $TORRENTDIR | wc -l) = 0 ] ; do
ADD="$(find $TORRENTDIR -name '*'.torrent | head -n1)"
$REMOTE -n $USER:$PASS -a "${ADD}" &> /dev/null
rm -f "${ADD}"
echo "Added "${ADD}""
ACTIVE="$[ $($REMOTE -n $USER:$PASS -l | grep -v Stopped | wc -l) - 2 ]"
echo $ACTIVE active torrents.
done
fi
exit 0
I have installed transmission according to Wengi's great tutorial and it has worked fine since then. However now I would like to run it as non-root user.
How should I do this? Should I ipkg install sudo? Should I use some configuration option in transmission's settings.json? Or some other way?
Oh, and one more thing I haven't figured out in Transmission: How can I set upload rate for a single file? In the web gui there's only option for global settings. And transmission-remote doesn't seem to have any options for this either. I know the OS X version has this function.
(And yes I've asked the transmission forums too... no replies :) )
Hi guys,
I´ve tried both scrtipts, but no one works.
First probably doesn´t work, because transmission uses password. The longer script give me this error codes:
Any idea whats wrong?Code:[admin@Asus RTR transmission]$ ./tran_mov.sh
./tran_mov.sh: ./tran_mov.sh: 14: find: not found
./tran_mov.sh: ./tran_mov.sh: 14: xargs: not found
tail: illegal option -- -
BusyBox v1.1.3 (2008.03.17-18:24+0000) multi-call binary
Usage: tail [OPTION]... [FILE]...
tail: illegal option -- -
BusyBox v1.1.3 (2008.03.17-18:24+0000) multi-call binary
Usage: tail [OPTION]... [FILE]...
$[ 3 - 2 ] active torrents.
[: 3: unknown operand
[: 3: unknown operand
./tran_mov.sh: ./tran_mov.sh: 59: find: not found
Added
localhost:9091 responded: "invalid or corrupt torrent file"
$[ 3 - 2 ] active torrents.
[: 3: unknown operand
./tran_mov.sh: ./tran_mov.sh: 59: find: not found
Added
localhost:9091 responded: "invalid or corrupt torrent file"
$[ 3 - 2 ] active torrents.
[: 3: unknown operand
./tran_mov.sh: ./tran_mov.sh: 59: find: not found
Added
localhost:9091 responded: "invalid or corrupt torrent file"
$[ 3 - 2 ] active torrents.
[: 3: unknown operand
./tran_mov.sh: ./tran_mov.sh: 59: find: not found
Added
localhost:9091 responded: "invalid or corrupt torrent file"
$[ 3 - 2 ] active torrents.
[: 3: unknown operand
./tran_mov.sh: ./tran_mov.sh: 59: find: not found
Added
I am stupid, Just now I´ve noticed that not installed find and xargs modules :D
Just for your information:
- New transmission 1.80 is available with support for magnet links and trackerless torrents (see http://transmissionbt.com
- Unfortunately this version frequently crashes - in my case it survives from 5 minutes to 1 hour.
- My recomendation is to stay with older version until fixes are made
There are patches to rtorrent that add magnet links support.
http://www.howtoforge.com/how-to-com...t-link-support
Maybe somebody compile it for Oleg.
Hi! Im using olegs firmware and transmission, yesterday i used the web gui to download 2 torrent files. (one torrent is a 5G file, other is like 200 files per 200 MB) Everything was working fine, but later i tryed to check the progress but the web interface does not load. What can i do? I installed everything according to the tutorial in this forum. Im using a 1TB external HDD. Thank you for any help.
If you are using new transmissionbt version 1.80 -> probably it has crashed.
You should probably downgrade to 1.76 or 1.77 and wait for bugfixes.
:mad:
Additionally new versions (1.80 1.81 1.82) have speed problems: downloads are very slow :mad:
Thanx for advice, but how can i tell which version i am running? :-) And how can i downgrade?
Edit: Ok i connected to SSH and typed "reboot", after that i was able to access the gui, when i clicked the preferences, theres a small 1.80 at the bottom. :-)
Now i have to figure out how to downgrade... Oh and 1 more question, can i acces the gui from work? :-) thx!
Edit1: SSH & reboot does not work anymore, i am not able to run my gui...
Edit2: I found out that web gui doesnt work on google chrome... In IE8 is everything fine :-) But i still didnt figure out how to connect to the web gui from work...