Rclone [rcd/rc] include/filter arguments not working?

Hi, I am trying to list and sync files using rclone rc <CMD> against rclone daemon.
all is working as expected but when trying to use include rclone ignores the arguments

The command(s) look like this:

rclone rcd --rc-no-auth
rclone rc operations/list fs=myfs: remote=myremote include='*.jpg'

I tried different variations of include argument, e.g. with --include, etc. but no luck.

while this works as expected:
rclone rc operations/list fs=myfs: remote=myremote

any ideas?
Thanks

You’ll need to set an option to use this.

Options are global at the moment which reflects rclone’s internal structure

Thank you for quick reply. I must still be doing something wrong:

ls /tmp/figs/
pic.jpg pic.png

rclone rc options/set --json '{"filter": {"IncludeRule": ["*.jpg"]}}'
{}

rclone rc operations/list fs="" remote=/tmp/figs | grep Path
“Path”: “/tmp/figs/pic.jpg”,
“Path”: “/tmp/figs/pic.png”,

Is this a bug then? Because when I try this instead:

rclone rcd --rc-no-auth --include '*.jpg'

I get a correct answer:

rclone rc operations/list fs="" remote=/tmp/figs | grep Path
“Path”: “/tmp/figs/pic.jpg”,

Which leads me to believe that unlike setting log level as in the documentation, setting/changing the filter rules have no effect once the server is running.

Hmm, yes reading though the source, I can see the filters are only initialised once, so as you said above, setting the include flag won’t work, sorry :frowning:

You can set the --include flag on the rclone rcd command, but that probably isn’t what you want.

Rclone needs another bit of rc to control the filters. At minimum it needs a filter/reload command I think which would reload the filters from the options.

thanks, would you like me to open a bug report?

Yes that would be great - thanks! Please make a new issue on github.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.