From d94120d9fb48ce4e6577a4d3f656c04d5ec0d77f Mon Sep 17 00:00:00 2001 From: chros73 Date: Fri, 4 May 2018 12:19:53 +0100 Subject: [PATCH] Update Auto Scraping page --- Auto-Scraping.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Auto-Scraping.md b/Auto-Scraping.md index 50aa862..ce1052b 100644 --- a/Auto-Scraping.md +++ b/Auto-Scraping.md @@ -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