Closed MrBamse closed 1 year ago
Try this instead of the current active
section:
# active
method.insert = d.timestamp.last_active, simple, "if=$d.peers_connected=,$cat=$system.time=,$d.custom=last_active"
method.insert = d.timestamp.last_active.update, simple|private,\
"d.custom.set=last_active,$cat=$system.time= ; branch=argument.0=,d.save_resume="
schedule2 = pyro_update_last_active, 24, 42,\
"d.multicall2=started,\"branch=$d.peers_connected=,d.timestamp.last_active.update=\""
method.set_key = event.download.resumed, !last_active,\
"branch=\"or={d.peers_connected=,not=$d.custom=last_active}\", d.timestamp.last_active.update=1"
method.set_key = event.download.finished, !last_active, "d.timestamp.last_active.update=1"
However, if you're actually looking for d.timestamp.last_xfer
, the last_xfer
field should function as-is.
The longer story is that jesec/rtorrent implements d.timestamp.last_active
natively so I missed this issue in my own testing. I'll test it on my own as well against vanilla before I add it back to the docs.
Works like a charm! You are a real star my friend! Thank you thank you thank you! :)
So if I understood you correctly, is it a correct assumption that the following accomplish the same result (it did in my env but not sure if that's a coincidence):
/usr/bin/docker exec rtorrent rtcontrol -s xfer -/5 completed=+5d
/usr/bin/docker exec rtorrent rtcontrol -s last_xfer -/5 completed=+5d
/usr/bin/docker exec rtorrent rtcontrol -s active -/5 completed=+5d
/usr/bin/docker exec rtorrent rtcontrol -s custom_KEY=d.timestamp.last_xfer -/5 completed=+5d
Btw, if there's somehow I can contribute/help out just let me know. What you are doing is of great service to a lot of ppl and many of us appreciate it, if although in silence.
It's pretty much coincidence. Sorting goes from low to high, and for most of those fields, if the torrent has never been active those values will be 0 or empty. If you have at least 5 torrents that have never been active, they'll consistently show up as the first 5 for the first 3 queries. Try adding -r
to reverse the sort order. I know it's bit counter-intuitive, but it's kept that way for historical reasons.
rtcontrol -s custom_KEY=d.timestamp.last_xfer -/5 completed=+5d
This is probably not doing what you're expecting, it's fetching the value of the custom key KEY=d.timestamp.last_xfer
(which will be empty) and sorting on that. The working command is custom_last_xfer
, but that field is the same exact value as last_xfer
but in string format. I'd recommend just using last_xfer
instead.
Also note that active
and last_xfer
are nearly identical: active
is the last time a peer was connected, and last_xfer
was the last time a peer connected and transferred data.
Just reporting things like this is a great help, there's a lot of features and use cases packed in here and it's long road to getting them into automated testing.
Thank you so much for getting back to me, and an extra big thanks for taking the time to explain the different variables, it's greatly appreciated and reduces the headscratching here by a factor of ten. ;P
We really appreciate the effort you put into this so let me know if you set up a donation or something, you definitely deserve at least a few beers for the help you've given me! ;)
Have an awesome day (and weekend) Take care my friend! ;)
No problem, I don't plan to ever take donations but if it's really burning a hole in your pocket archive.org is a worthy cause.
First off, thank you so much for this port and all the work you've put into it, it really works super great! :)
I do apologize if this has been brought up before but I just couldn't find it in any of the corners of the internet.
The error I get the following error when trying to use the filter "active" (e.g. rtcontrol -s active -/5 completed=+5d)
Settings And these are my settings from .rtorrent.rc (copied straight from https://kannibalox.github.io/pyrosimple/rtorrent-config/)
Goal I'm trying to setup a filter where the five completed items that were the opposite of last to do any transfers are listed. Another option, preferably, would be a filter that lists every item that has not seeded for X days.
Conclusion
schedule2 = pyro_update_last_xfer, 33, 17,"d.multicall2=active,\"branch=$d.last_xfer.is_active=,pyro._last_xfer_update=\""
is mentioned twice.Thank you so much, and again; great job! :)