mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-09 19:52:31 +00:00
Update Auto Scraping page
+7
-3
@@ -35,13 +35,17 @@ Let's try to balance the requests to not fire up them at the same time:
|
||||
All you have to do is to copy-paste the following config into your `rTorrent` config. That's it.
|
||||
|
||||
```ini
|
||||
# Set scrape intervals for active (~10 mins) and idle items (~12 hours)
|
||||
method.insert = cfg.scrape_interval.active, value, 580
|
||||
method.insert = cfg.scrape_interval.idle, value, 43180
|
||||
|
||||
# Regularly update scrape information for all torrents (even stopped ones), it won't affect the operation of rtorrent, but nice to have these values updated.
|
||||
# This info is only updated when rtorrent starts or a torrent is added by default.
|
||||
# Try to balance calls to not fire them up at the same time (since multiscraping isn't implemented in libtorrent). Check for update every 5 minutes and distinguish between 2 groups:
|
||||
# - transferring (uploading and/or downloading) torrents: update in every 10 minutes
|
||||
# - non-transferring torrents: update in every 12 hours
|
||||
# helper method: sets current time in a custom field (tm_last_scrape) and saves session
|
||||
method.insert = d.last_scrape.set, simple|private, "d.custom.set=tm_last_scrape,$cat=$system.time=; d.save_full_session="
|
||||
method.insert = d.last_scrape.set, simple|private, "d.custom.set=tm_last_scrape,$cat=$system.time=; d.save_resume="
|
||||
# helper method: sends the scrape request and sets the tm_last_scrape timestamp and saves session
|
||||
method.insert = d.last_scrape.send_set, simple, "d.tracker.send_scrape=0;d.last_scrape.set="
|
||||
# helper method: decides whether the required time interval (with the help of an argument) has passed and if so calls the above method
|
||||
@@ -49,9 +53,9 @@ method.insert = d.last_scrape.check_elapsed, simple|private, "branch={(elapsed.g
|
||||
# helper method: checks for non-existing/empty custom field to be able to test its validity later
|
||||
method.insert = d.last_scrape.check, simple|private, "branch={d.custom=tm_last_scrape,d.last_scrape.check_elapsed=$argument.0=,d.last_scrape.send_set=}"
|
||||
# sets custom field (tm_last_scrape) to current time only for torrents just has been added (skips setting time on purpose when rtorrent started)
|
||||
method.set_key = event.download.inserted_new, last_scrape_i, "d.last_scrape.set="
|
||||
method.set_key = event.download.inserted_new, ~last_scrape_i, "d.last_scrape.set="
|
||||
# check for update every 5 minutes (300 sec) and update scrape info for transferring torrents in every 10 minutes (600-20=580 sec) and for non-transferring ones in every 12 hours (43200-20=43180 sec)
|
||||
schedule2 = last_scrape_t, 300, 300, "d.multicall2=default,\"branch=\\\"or={d.up.rate=,d.down.rate=}\\\",d.last_scrape.check=580,d.last_scrape.check=43180\""
|
||||
schedule2 = last_scrape_t, 300, 300, "d.multicall2=default,\"branch=\\\"or={d.up.rate=,d.down.rate=}\\\",d.last_scrape.check=$cfg.scrape_interval.active=,d.last_scrape.check=$cfg.scrape_interval.idle=\""
|
||||
```
|
||||
|
||||
### Recommendation
|
||||
|
||||
Reference in New Issue
Block a user