[feature request] stop seeding at certain ratio

Feature requests for the GTK+ version of Transmission
yobbo
Posts: 1
Joined: Tue Mar 04, 2008 3:42 am

[feature request] stop seeding at certain ratio

Postby yobbo » Tue Mar 04, 2008 3:59 am

I did a quick search of the forums and this feature seems to already be in the Mac release. It would be great to have it in the GTK+ one too.

In any case, I'm happy to see Transmission as the default bittorrent application in Ubuntu Hardy, it's a great app. Nice work devs :).

Rynor
Posts: 4
Joined: Tue Apr 01, 2008 8:03 pm

Postby Rynor » Tue Apr 01, 2008 8:05 pm

I second that!

It's one of the things that keeps me from using it as my main client.

Festor
Posts: 57
Joined: Thu Aug 30, 2007 9:23 pm

Postby Festor » Fri May 09, 2008 2:56 pm

I was going to post the same request...

Please!! , this feature is required in many communities bittorrent :roll:

Ansible
Posts: 8
Joined: Sat Jan 26, 2008 8:33 pm

Postby Ansible » Tue May 13, 2008 8:19 pm

I'd like this too.

Theetjuh
Posts: 1
Joined: Thu Sep 25, 2008 6:49 pm

Re: [feature request] stop seeding at certain ratio

Postby Theetjuh » Thu Sep 25, 2008 6:55 pm

I was really amazed when i saw this wasn't in the GTK+ version :?

I so really really really need this setting :(

[edit]
I just noticed http://trac.transmissionbt.com/ticket/671, 8 months old ... how far are we now with these changes ?
[/edit]

AnubisRae
Posts: 3
Joined: Sat Oct 04, 2008 9:53 am

Re: [feature request] stop seeding at certain ratio

Postby AnubisRae » Sat Oct 04, 2008 9:59 am

Would also like to see this feature in the GTK+ version... hrmm, all these things missing from Transmission in Linux... maybe I should go back to OSX? :? :shock:

Rolcol
Posts: 337
Joined: Sun Aug 10, 2008 8:00 am

Re: [feature request] stop seeding at certain ratio

Postby Rolcol » Sat Oct 11, 2008 4:05 am

Transmission is my favorite BT Client on both Mac and Linux. I'd love to have this feature in the gtk+ version. Please!

cokelid
Posts: 1
Joined: Mon Oct 13, 2008 11:05 am

Re: [feature request] stop seeding at certain ratio

Postby cokelid » Mon Oct 13, 2008 11:13 am

I'm amazed this is missing too. Makes it difficult, if not impossible, to effectively manage data-volumes.

I am surprised that Ubuntu has chosen Transmission at the default BT client when basic controls like this are still missing?

sunixadm
Posts: 12
Joined: Mon Oct 27, 2008 12:18 pm

Re: [feature request] stop seeding at certain ratio

Postby sunixadm » Mon Oct 27, 2008 12:37 pm

It would be nice to be able to do this in the UI, but can be accomplished now using transmission-remote. I have accomplished this by activating the Web Interface on the Web tab of the preferences, restricting the access to localhost and, using a cronjob to run a transmission-remote script every minute that checks the status of each torrent and based on the status of the torrent, will stop (pause) the torrent. I have also configured the web access to require a username (uname in script below) and a password (passwd). The uname and passwd are overkill (maybe) as someone has to get on the machine before she could connect to the web interface as it is restricted to the localhost. If I want to check on the torrents remotely I ssh to the machine and use transmission-remote to do this. This is what my script looks like:

Code: Select all

#!/bin/sh
for i in `/usr/bin/transmission-remote -l -n uname:passwd | /bin/grep -v Ratio | /bin/grep Done | /usr/bin/awk '{ print $1 }'`
do
/usr/bin/transmission-remote -n uname:passwd -t $i -S
done


My script "trpause.sh" stops (pauses) any torrent with a status of Done. To do this based on a specific ratio would be a simple change. If you want this to run more often than once every minute you could modify the script to use "sleep nn" and have it run in the background instead of as a cronjob.

This is what my cronjob looks like:

Code: Select all

* * * * * /home/user/.bts/bin/trpause.sh >/dev/null 2>&1


I hope this helps and apologize if I have repeated information posted somewhere else, but I haven't come across it yet on the web.
-Joe

Jordan
Transmission Developer
Posts: 2311
Joined: Sat May 26, 2007 3:39 pm
Location: Titania's Room

Re: [feature request] stop seeding at certain ratio

Postby Jordan » Mon Oct 27, 2008 1:47 pm

That's very cool. Thanks for sharing it!

sunixadm
Posts: 12
Joined: Mon Oct 27, 2008 12:18 pm

Re: [feature request] stop seeding at certain ratio

Postby sunixadm » Mon Oct 27, 2008 2:09 pm

Glad to contribute.
I hope it helps and maybe it will contribute to more people using transmission.
-joe

rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: [feature request] stop seeding at certain ratio

Postby rb07 » Sun Dec 07, 2008 11:31 pm

Here's a rewrite of the script with a seed ratio as the condition:

Code: Select all

#!/bin/sh

TR_R=/usr/bin/transmission-remote
PORT=9091
USER=admin
PASS=password
RATIO=1.10

for i in `$TR_R $PORT -l -n $USER:$PASS | \
  awk '$3 ~ "Done" && $6 >= R && $7 !~ "Stopped" { print $1 }' R=$RATIO`
do
  $TR_R $PORT -n $USER:$PASS -t $i -S
done


CORRECTION: Since transmission-remote -l rounds off the ratio to one decimal, for instance 1.05 shows as 1.1, this script is not working exactly right... I'll update the script after I test a new version that goes into detail (where transmission-remote does show the ratio with 2 decimal places).

rb07
Posts: 1400
Joined: Sun Aug 24, 2008 3:14 am

Re: [feature request] stop seeding at certain ratio

Postby rb07 » Tue Dec 09, 2008 9:56 pm

Improved script:
  • Uses up to 2 decimals as per torrent detailed ratio;
  • Adds exceptions, which is a list of space separated numbers enumerating torrents that should not be stopped by this script. Example: EXCEPTIONS=( 1 16 ). The numbers come from the list shown with 'transmission-remote -l';
  • The email sent by cron tells you what torrent was stopped;
  • Changed to bash in order to use an array for the above list,

Code: Select all

#!/bin/bash

TR_R=/usr/bin/transmission-remote
PORT=9091
USER=user-name
PASS=password
RATIO=1.10
declare -a EXCEPTIONS=( )

for i in `$TR_R $PORT -l -n $USER:$PASS | \
  awk '$3 ~ "Done" && $6 >= R && $7 !~ "Stopped" { print $1 }' R=$RATIO`
do
  skip=0
  for j in ${EXCEPTIONS[@]}
  do
    if [ $j -eq $i ]; then
      skip=1
    fi
  done
  if [ $skip -eq 0 ]; then
    $TR_R $PORT -n $USER:$PASS -t $i -i | \
      awk '/Ratio/ { if ($2 >= R) { print "Stopping: ", a[2]; exit 0; } else exit 1; }
      /Name/ { split($0, a, ":"); }' R=$RATIO &&
    $TR_R $PORT -n $USER:$PASS -t $i -S
  fi
done

thomasjack
Posts: 1
Joined: Tue Feb 17, 2009 4:49 am

Re: [feature request] stop seeding at certain ratio

Postby thomasjack » Tue Feb 17, 2009 4:55 am

Looks like seed ratio limiting was added to libtransmission 3 days ago: http://trac.transmissionbt.com/changeset/7888. Then two days ago there was "attempt 1" to use this in the macosx client: http://trac.transmissionbt.com/changeset/7892.

Bet this feature is coming soon for the GTK+ client... :mrgreen:

Jordan
Transmission Developer
Posts: 2311
Joined: Sat May 26, 2007 3:39 pm
Location: Titania's Room

Re: [feature request] stop seeding at certain ratio

Postby Jordan » Tue Feb 17, 2009 6:29 am

thomasjack wrote:Looks like seed ratio limiting was added to libtransmission 3 days ago: http://trac.transmissionbt.com/changeset/7888. Then two days ago there was "attempt 1" to use this in the macosx client: http://trac.transmissionbt.com/changeset/7892.

Bet this feature is coming soon for the GTK+ client... :mrgreen:


Look at r7888 more closely, it's already in the GTK+ client now... :)


Return to “GTK+ Requests”