| 1 | [[libtorrentMirror]] |
| 2 | |
| 3 | = Ratio handling = |
| 4 | |
| 5 | The ratio handling has been updated in rtorrent 0.8.4. |
| 6 | |
| 7 | == Quick setup == |
| 8 | |
| 9 | Here is a working config that you can use as a starting point. |
| 10 | |
| 11 | Use the 'max', 'min' and 'upload' variables as in the old version. |
| 12 | |
| 13 | {{{ |
| 14 | # Enable the default ratio group. |
| 15 | ratio.enable= |
| 16 | |
| 17 | # Change the limits, the defaults should be sufficient. |
| 18 | ratio.min.set=100 |
| 19 | ratio.max.set=300 |
| 20 | ratio.upload.set=20M |
| 21 | |
| 22 | # Changing the command triggered when the ratio is reached. |
| 23 | system.method.set = group.seeding.ratio.command, d.close=, d.erase= |
| 24 | }}} |
| 25 | |
| 26 | == The basics == |
| 27 | |
| 28 | {{{ |
| 29 | # Default group for ratio handling. |
| 30 | group.seeding.view |
| 31 | group.seeding.ratio.command |
| 32 | group.seeding.ratio.disable |
| 33 | group.seeding.ratio.enable |
| 34 | group.seeding.ratio.max |
| 35 | group.seeding.ratio.max.set |
| 36 | group.seeding.ratio.min |
| 37 | group.seeding.ratio.min.set |
| 38 | group.seeding.ratio.upload |
| 39 | group.seeding.ratio.upload.set |
| 40 | |
| 41 | # The above commands can be called through: |
| 42 | ratio.disable |
| 43 | ratio.enable |
| 44 | ratio.max |
| 45 | ratio.max.set |
| 46 | ratio.min |
| 47 | ratio.min.set |
| 48 | ratio.upload |
| 49 | ratio.upload.set |
| 50 | }}} |
| 51 | |
| 52 | The 'group.seeding.view' variable points to the 'seeding' view, which |
| 53 | contains all seeding downloads, and the default 'ratio.command' closes |
| 54 | the download. To enabled or disable the ratio handling for the group, |
| 55 | call the 'enable' and 'disable' commands which automatically adds it |
| 56 | to the scheduler. |
| 57 | |
| 58 | == Ratio groups == |
| 59 | |
| 60 | If you wish to specify different ratio's for different watch |
| 61 | directories, do the following: |
| 62 | |
| 63 | {{{ |
| 64 | # Add new views. You may find out what downloads they contain through |
| 65 | # 'ui.current_view.set=group_1' command or XMLRPC calls. |
| 66 | view_add = view_group_1 |
| 67 | |
| 68 | # Make the views persist across sessions. |
| 69 | view.persistent = view_group_1 |
| 70 | |
| 71 | # Create new groups, 'group.insert = <name>, <view>'. |
| 72 | group.insert = group_1, view_group_1 |
| 73 | |
| 74 | group.group_1.ratio.enable= |
| 75 | group.group_1.ratio.min.set=100 |
| 76 | group.group_1.ratio.max.set=300 |
| 77 | group.group_1.ratio.upload.set=20M |
| 78 | |
| 79 | # Optionally you may create a persistent view group directly. Note |
| 80 | # that the view name is the same as the group name. |
| 81 | group.insert_persistent_view = group_2 |
| 82 | |
| 83 | group.group_2.ratio.enable= |
| 84 | group.group_2.ratio.min.set=300 |
| 85 | group.group_2.ratio.max.set=0 |
| 86 | |
| 87 | # Downloads need to be inserted into the view with the 'view.set_visible' |
| 88 | # command. Note that extra parameters to 'load' are commands called |
| 89 | # with the newly created download as the target. |
| 90 | schedule = watch_directory_1,5,10,"load_start_verbose=foo_1/*.torrent, view.set_visible=view_group_1" |
| 91 | schedule = watch_directory_2,5,10,"load_start_verbose=foo_2/*.torrent, view.set_visible=group_2" |
| 92 | }}} |