-
-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify directory.watch.added and add directory.watch.removed command #616
base: master
Are you sure you want to change the base?
Conversation
The limitation of "removed" is arbitrary, and it is not very flexible, e.g. does not take care of re-ties. The better / more consistent way would be to fire an And then the next logical step is call it And the special path '*' would mean "all existing directory.watch.added dirs". Finally, let the old super-special tied/untied commands as-is, deprecate them wholesale, and add |
And while looking at that |
See #374 (comment) about why you do not need more than the handler name as an argument. |
A.
I agree, although it's working fine:
About the events: it's an interesting idea, but somebody else has to implement it :) . |
B.
Thanks, it didn't work for me for whatever reason when I tried (otherwise probably I wouldn't have modified it).
Anyway, @rakshasa will decide it. |
One of the advantages of using "inotify" to load and remove downloads by torrent meta files is the reduced file system IO (apart from it's instant).
Refers to: #374
A. Modify
directory.watch.added
Allow it to accept multiple commands (as
load.*
commands).There are multiple ways to achieve this but since there's no "shortcut" (the directory (that is watched) for inotify has to be separated), the final command (that is called on an "add" event) is reconstructed as a line of config.
load.*
commands),
parameter separator) then it needs to be included inside quotes ("
)B. Add
directory.watch.removed
Similarly to loading event, add ability to handle removing events of meta files as
*_untied
commands:*_untied
commands can't deal with a download individually: they go through and check all the downloads (they can generate lot of IO, especially if they are used withschedule
command)directory.watch.removed
handles this individuallySince it doesn't need any additional commands, it accepts multiple directories as parameters.
d.stop
,d.close
,d.erase
directory.watch.removed = d.erase, (cat,(cfg.dir.meta_compl),various/), (cat,(cfg.dir.meta_compl),unsafe/)
C. Rename
*tied
commandsRename untied commands and add redirects for the new names to preserve compatibility:
start_tied
->tied.start
stop_untied
->untied.stop
close_untied
->untied.close
remove_untied
->untied.remove
D. Limitations
directory.watch.added
ordirectory.watch.removed
E.
directory.watch.*
commands in actionLet's assume the following: