Not sure if this has been discussed as yet, and I’m aware you scrape logs for events like new files being found on remotes (like polling google drive) - but was wondering if there’s any appetite for proxying such events to an API that rclone could be polled on.
It’d be useful if tools could use rc to poll for events like new files, deleted files, etc and trigger actions accordingly.
I’m sure there’s non plex usecases for having rclone report these events though and would love to hear any ideas where this would be useful to trigger things.
I guess it would be something along the lines of rc/events where you are returned a bunch of filesystem events like google drive reports when you poll that for cache eviction and updates.
Essentially something to poll for events as they happen upstream from the mount.
The gist being is that using crypt with any mount makes the native API for events less useful as it’s all obstructed, the functionality would bridge the gap and allow apps to check rclone for events rather than gdrive etc.
I guess realistically you’d want to proxy events from the drive under the mount and use decryption to proxy out useful information about the files.
Not sure if it’s better to have the mount events, which would include new files being added from that machine earlier than the cloud itself (cache upload timer) or just the drive, so even if the file is available it still waits till it’s uploaded first.
The latter is probably more universal and makes it not reliant on the cache layer.
Would being able to decrypt the drive changes with rclone perhaps be more helpful?
You can so this with rclone cryptdecode - that could be added to @spicypixel 's script.
rclone cryptdecode returns unencrypted file names when provided with
a list of encrypted file names. List limit is 10 items.
If you supply the --reverse flag, it will return encrypted file names.
use it like this
rclone cryptdecode encryptedremote: encryptedfilename1 encryptedfilename2
rclone cryptdecode --reverse encryptedremote: filename1 filename2
Usage:
rclone cryptdecode encryptedremote: encryptedfilename [flags]
Flags:
-h, --help help for cryptdecode
--reverse Reverse cryptdecode, encrypts filenames
Yeah that’s a legitimate option, I’ll ask the developer if they’re open to doing that.
Thanks anyway!
Edit: I would then say would it be feasible to have an rc/cryptdecode call? Instead of giving over rclone crypt phrases or having to provide rclone config location would it make sense to be able to send an encrypted path to the rc instance and get back the decrypted path? I figure this is the most secure way so that no keys are needed to decrypt merely authenticated access to the rc interface.
Since I run rclone on its own user with very locked down permissions on the rclone.conf I guess I’d have to allow reading from the scripts user to allow them to use rclone against the crypted remote correct?