-
|
Hello!
The label (custom1) works great, and is immediately available when using inserted_new. But I believe that torrent metadata isn't loaded at that point yet, and so I delay the file-checking by 1s just to let it load. Here's my current logic: Sadly, this doesn't seem to work. I can't seem to get d.size_files to work inside an if / branch conditional. I've tried multiple variations (if/branch/(d.size_files=)/$d.size_files/d.size_files) but nothing seems to be correct. Anyone else done something like this? Any tips or guidance? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
|
You need to use |
Beta Was this translation helpful? Give feedback.
-
|
Ok, I've updated my config a bit, but am still getting errors when trying to run the method. I believe the schedule works (after adding a torrent there is a delay of 1s before the following error message shows up in rtorrent: Scheduled command failed: route_check: Target of wrong type to command. Here's my current code: I get the error even with the debug version (print d.size_files), but it's the same error for both. Am I not using d.size_files correctly? Or it there something else going on? |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for your patience, I'm still trying to understand rtorrent internals properly, but I'm still struggling. Current config: This starts up properly, but doesn't seem to actually execute my route_logic. I've tried on inserted, inserted_new, and opened. Am I incorrectly using the event? Is this not how you call? Should I be using insert or set_key? As it is now, the added torrents simply go to the default directory. |
Beta Was this translation helpful? Give feedback.
-
From src/main.cc. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you, those examples helped greatly! This works great with something like sonarr / radarr setting the custom1 tag, and cleanly creates folders for single-file torrents. Thanks for all the help! |
Beta Was this translation helpful? Give feedback.
Thank you, those examples helped greatly!
For anyone wanting a similar solution in the future, the following snippet worked for me:
This works great with something like sonarr / radarr setting the custom1 tag, and cleanly creates folders for single-file torrents.
Thanks for all the help!