Bug in handling last_active field in 0.9.4?

31 views
Skip to first unread message

Krisztian Kovacs

unread,
Jun 23, 2015, 9:46:54 AM6/23/15
to pyrosco...@googlegroups.com
Hi pyroscope!

I just noticed (when I made this reply https://github.com/rakshasa/rtorrent/issues/305 ) that there is a problem in the code (resumed event part, in rtorrent-0.8.9.rc.default ) that made the property updated after restarting rtorrent. (I'm using your bintray build for Ubuntu Trusty)

So here's my mod to fix it:
- it adds a value for every torrent that has been started, but not overwriting if there isn't any peer

# SCHEDULE: Set "last_active" custom field for items that have peers
method
.insert = d.last_active, simple|value, "if=$d.peers_connected=,$cat=$system.time=,$d.custom=last_active"
method
.insert = d.last_active.set, simple|private, "d.custom.set=last_active,$cat=$system.time="
schedule
= update_last_active, 24, 42, "d.multicall2=started,\"branch=$d.peers_connected=,d.last_active.set=\""
method
.insert = d.last_active.print, simple|private, "print=\"$cat={$convert.date=$d.last_active=, \\\" \\\", $convert.time=$d.last_active=}\""
method
.insert = d.last_active.check, simple|private, "or={d.peers_connected=,not=$d.custom=last_active}"
method
.set_key = event.download.resumed, last_active_r, "branch={d.last_active.check=,d.last_active.set= ;d.save_full_session=}"
method
.set_key = event.download.finished, last_active_f, "d.last_active.set= ;d.save_full_session="


Thanks for your great mods, again!

Chros


pyroscope

unread,
Jun 23, 2015, 12:43:42 PM6/23/15
to pyrosco...@googlegroups.com, chr...@gmail.com
Please open a ticket, else this will go under.
Reply all
Reply to author
Forward
0 new messages