Hi,
i thought of this idea as i examined my rclone system.
Right now I use rclone as backend for my plex media storage. which works well.
my original setup used to be the usual gdrive > cache > crypt. However recently I've discovered that not using cache backend actually improve the streaming speed by a lot. used to shutter on 1 1080p stream.
That worked well until i remembered that i have modified plex_rcs script that watch for cache expire events to trigger localized plex scan on folder. without having cache the script broke down as it's cant really tell if there is new files that are added or removed to trigger the scan.
so i naturally made two mount points /media /cache and had plex_rcs watch /cache for changes and then trigger updates on /media. thats also works somewhat nice. but it's clunky and have to use regex to parse rclone output and sometimes it's difficult to filter for items.
so i came up with this idea.
wouldn't it be possible to have rclone publish events via rc/ or for example redis that discribe changes to file system, for example.
{
"event": "add",
"metadata": {
"type": "folder",
"path": "/path/to/folder"
}
}
{
"event": "add",
"metadata": {
"type": "file",
"mimetype": "video/mp4",
"path": "/path/to/folder/file.mp4"
}
}
{
"event": "delete",
"metadata": {
"type": "folder",
"path": "/path/to/folder/"
}
}
then you would have listener that actively listening to events and process them for variety of reasons.
if using rc/ or redis not possible we could have extra config section related to events for example
[_rclone_events]
a=/path/to/script:[add,delete]
or could be command line flag
rclone mount foo:/bar --events-subscribe add,delete --events-listener /usr/local/process