Skip to content

Is it possible to move completed torrents after X amount of hours? #472

@radhoo2k10

Description

@radhoo2k10

Hi

I'm trying to set up an automation that moves completed torrents from SSD to spin-drive after 3 hours so I can seed in the initial surge. Is this possible?

Tried this but it didn't work. Added it in the bottom of .rtorrent.rc. Chatgpt code:

# Maximum and minimum number of peers to connect to per torrent
throttle.min_peers.normal.set = 99
throttle.max_peers.normal.set = 100

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

# Maximum number of simultanious uploads per torrent
throttle.max_uploads.set = 300
throttle.max_downloads.global.set = 150
throttle.max_uploads.global.set   = 300

# Global upload and download rate in KiB. "0" for unlimited
throttle.global_down.max_rate.set_kb = 0
throttle.global_up.max_rate.set_kb = 0

# Enable DHT support for trackerless torrents or when all trackers are down
# May be set to "disable" (completely disable DHT), "off" (do not start DHT),
# "auto" (start and stop DHT as needed), or "on" (start DHT immediately)
dht.mode.set = on

# Enable peer exchange (for torrents not marked private)
protocol.pex.set = no

# Check hash for finished torrents. Might be usefull until the bug is
# fixed that causes lack of diskspace not to be properly reported
pieces.hash.on_completion.set = no

# Set whether the client should try to connect to UDP trackers
#trackers.use_udp.set = yes

# Set the max amount of memory address space used to mapping file chunks. This refers to memory mapping, not
# physical memory allocation. Default: 1GB (max_memory_usage)
# This may also be set using ulimit -m where 3/4 will be allocated to file chunks
pieces.memory.max.set = 2048M
pieces.preload.type.set = 2

# Alternative calls to bind and ip that should handle dynamic ip's
#schedule2 = ip_tick,0,1800,ip=rakshasa
#schedule2 = bind_tick,0,1800,bind=rakshasa

# Encryption options, set to none (default) or any combination of the following:
# allow_incoming, try_outgoing, require, require_RC4, enable_retry, prefer_plaintext
protocol.encryption.set = allow_incoming,enable_retry,prefer_plaintext
network.http.ssl_verify_peer.set = 0
network.http.ssl_verify_host.set = 0
network.max_open_files.set = 4096
network.max_open_sockets.set = 1536
network.http.max_open.set = 99
network.send_buffer.size.set = 128M
network.receive_buffer.size.set = 4M

system.file.allocate.set = 1
network.xmlrpc.size_limit.set = 5M
schedule2 = session_save, 1200, 43200, ((session.save))

# Set the umask for this process, which is applied to all files created by the program
system.umask.set = 0022

# Add a preferred filename encoding to the list
encoding.add = UTF-8

# Watch a directory for new torrents, and stop those that have been deleted
#directory.watch.added = (cat,(cfg.watch)), load.start
#schedule2 = untied_directory, 5, 5, (cat,"stop_untied=",(cfg.watch),"*.torrent")

# Close torrents when diskspace is low
schedule2 = monitor_diskspace, 15, 60, ((close_low_diskspace,1000M))

# Custom download locations (added by me)
directory.default.set = (cat,"/temp")
#method.insert = cfg.download_complete_custom, private|const|string, (cat,"/torrents")

#############################################################################
# Forsinket og kategoribasert flytting av ferdige torrents
# Kompatibel med rTorrent 0.15.3 / crazymax Docker
# Venter 10 minutter før flytting
#############################################################################

# Egen ferdig-mappe
method.insert = cfg.download_complete_custom, private|const|string, (cat,"/torrents")

# Lag persistent view for ferdige torrents
view.add = finished_waiting
view.persistent = finished_waiting

# Når torrent blir ferdig, legg den i ventekø
method.set_key = event.download.finished, add_to_finished_waiting, \
    "d.views.push_back_unique = finished_waiting ; view.filter_download = finished_waiting ; \
     print = \"[rtorrent] lagt i ventekø: \", (d.name)"

# Schedule sjekker hver 60 sek om torrent har vært ferdig > 600 sek (10 min)
schedule2 = delayed_move_check, 60, 60, \
    "d.multicall2=finished_waiting, branch=\"elapsed.greater=(d.timestamp.finished),30\", \
        execute2=sh,-c,'mkdir -p \"$cfg.download_complete_custom=/$d.custom1=\"; \
        mv -u \"$d.get_base_path=\" \"$cfg.download_complete_custom=/$d.custom1=\"'; \
        d.set_directory=\"$cfg.download_complete_custom=/$d.custom1=\"; \
        d.views.remove=finished_waiting ; \
        print = \"[rtorrent] flyttet: \", (d.name)"

# Valgfritt: debug-utskrift når torrent legges i kø
method.set_key = event.download.finished, debug_finished, \
    "print = \"[rtorrent] ferdig nedlasting lagt i ventekø: \", (d.name)"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions