kannibalox / pyrosimple

An overhauled fork of the pyrocore tools for rTorrent
https://kannibalox.github.io/pyrosimple/
GNU General Public License v3.0
48 stars 5 forks source link

Command "d.last_xfer.is_active" does not exist #38

Closed codedesperate closed 1 year ago

codedesperate commented 1 year ago

I am really enjoying pyrosimple, but I've come across this error in rtorrent: Scheduled command failed: pyro_update_last_xfer: Command "d.last_xfer.is_active" does not exist

I've copy/pasted from the documentation page, so I don't think I should be getting this error? https://kannibalox.github.io/pyrosimple/rtorrent-config/#timestamps

This is my entire .rtorrent.rc conf

# This is the rtorrent configuration file installed by rtinst script - https://github.com/arakasi72/rtinst
# This file is installed to ~/.rtorrent.rc
# Enable/modify the options as needed, uncomment the options you wish to enable.
# This configuration will work with most systems, but optimal settings are dependant on specific server setup

### Set Directories
method.insert = cfg.basedir,     private|const|string, (cat,"/home/CENSORED/rtorrent/")
method.insert = cfg.watch,       private|const|string, (cat,(cfg.basedir),"watch/")

#method.insert = cfg.logs,       private|const|string, (cat,(cfg.basedir),"log/")
#method.insert = cfg.logfile,    private|const|string, (cat,(cfg.logs),"rtorrent-",(system.time),".log")

session.path.set = (cat,(cfg.basedir),".session")
# directory.default.set = (cat,(cfg.basedir),"download")
directory.default.set = /home/CENSORED/rtorrent/download/ruTorrent_Downloads/

schedule2 = watch_directory,5,5,((load.start,(cat,(cfg.watch),"*.torrent")))

#system.umask.set = 0000

### BitTorrent
# Global upload and download rate in KiB, `0` for unlimited
throttle.global_down.max_rate.set = 0
throttle.global_up.max_rate.set = 0

# Maximum number of simultaneous downloads and uploads slots
throttle.max_downloads.global.set = 150
throttle.max_uploads.global.set = 300

# Maximum and minimum number of peers to connect to per torrent while downloading
throttle.min_peers.normal.set = 30
throttle.max_peers.normal.set = 150

# Same as above but for seeding completed torrents (seeds per torrent)
throttle.min_peers.seed.set = -1
throttle.max_peers.seed.set = -1

### Networking
network.port_range.set = 51132-51132
network.port_random.set = yes
dht.mode.set = disable
protocol.pex.set = no
trackers.use_udp.set = yes

# network.scgi.open_port = localhost:5000
network.scgi.open_port = 127.0.0.1:5000
network.http.ssl_verify_peer.set = 0
protocol.encryption.set = allow_incoming,enable_retry,prefer_plaintext

network.max_open_files.set = 4096
network.max_open_sockets.set = 1536
network.http.max_open.set = 48
network.send_buffer.size.set = 128M
network.receive_buffer.size.set = 4M

### Memory Settings
pieces.hash.on_completion.set = no
pieces.preload.type.set = 1
pieces.memory.max.set = 3500M

### Logging:
#   Levels = critical error warn notice info debug
#   Groups = connection_* dht_* peer_* rpc_* storage_* thread_* tracker_* torrent_*
#print = (cat,"Logging to ",(cfg.logfile))
#log.open_file = "log", (cfg.logfile)
#log.add_output = "info", "log"
#log.add_output = "tracker_debug", "log"

### The following line initialises rutorrent plugins without needing to open the web interface
execute2 = {sh,-c,/usr/bin/php /var/www/rutorrent/php/initplugins.php CENSORED &}

# This is for rtcontrol

# loaded
method.set_key = event.download.inserted_new, !time_stamp,\
    "d.custom.set=tm_loaded,$cat=$system.time= ; d.save_resume="

# started
method.insert = pyro._tm_started.now, simple|private,\
    "d.custom.set=tm_started,$cat=$system.time= ; d.save_resume="
method.set_key = event.download.resumed, !time_stamp,\
    "branch=d.custom=tm_started,false=,pyro._tm_started.now="

# completed
method.insert = pyro._tm_completed.now, simple|private,\
    "d.custom.set=tm_completed,$cat=$system.time= ; d.save_resume="
method.set_key = event.download.finished, !time_stamp,\
    "pyro._tm_completed.now="
method.set_key = event.download.hash_done, !time_stamp,\
    "branch=\"and={d.complete=,not=$d.custom=tm_completed}\", pyro._tm_completed.now="

# active - This section is *not* needed for variants that implement `d.timestamp.last_active` natively (i.e. jesec/rtorrent)
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"

# last_xfer
method.insert.value = pyro.last_xfer.min_rate, 5000
method.insert = pyro._last_xfer_check_min_rate, simple|private,\
    "greater=argument.0=,pyro.last_xfer.min_rate="
method.insert = pyro._last_xfer_update, simple|private,\
    "d.custom.set=last_xfer,$cat=$system.time= ; branch=argument.0=,d.save_resume="
schedule2 = pyro_update_last_xfer, 33, 17,\
    "d.multicall2=active,\"branch=$d.last_xfer.is_active=,pyro._last_xfer_update=\""
kannibalox commented 1 year ago

Thanks for the report, it looks like I only had d.last_xfer.is_active defined in the full rtorrent.rc, I'll add it to the timestamp section as well.