Skip to content

Commit

Permalink
Add option to set unlimited seed ratio
Browse files Browse the repository at this point in the history
Set seed_ratio_limit to a negative value to seed indefinitely
  • Loading branch information
rapperskull authored and nning committed Nov 16, 2022
1 parent 7afc21a commit 8d6eabd
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions lib/transmission-rss/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,16 @@ def add_torrent(file, type = :url, options = {})
@log.debug(log_message)

if id && options[:seed_ratio_limit]
set_torrent(id, {
'seedRatioLimit' => options[:seed_ratio_limit].to_f,
'seedRatioMode' => 1
})
if options[:seed_ratio_limit].to_f < 0
set_torrent(id, {
'seedRatioMode' => 2
})
else
set_torrent(id, {
'seedRatioLimit' => options[:seed_ratio_limit].to_f,
'seedRatioMode' => 1
})
end
end

response
Expand Down

0 comments on commit 8d6eabd

Please sign in to comment.