diff --git a/README.md b/README.md index 3ce4d71a..e24408a1 100644 --- a/README.md +++ b/README.md @@ -626,10 +626,12 @@ through arguments: * `-e2ts` also scans for tags in all files that don't have tags yet * `-e2tsr` also deletes all existing tags, doing a full reindex -the same arguments can be set as volume flags, in addition to `d2d` and `d2t` for disabling: +the same arguments can be set as volume flags, in addition to `d2d`, `d2ds`, `d2t`, `d2ts` for disabling: * `-v ~/music::r:c,e2dsa,e2tsr` does a full reindex of everything on startup * `-v ~/music::r:c,d2d` disables **all** indexing, even if any `-e2*` are on * `-v ~/music::r:c,d2t` disables all `-e2t*` (tags), does not affect `-e2d*` +* `-v ~/music::r:c,d2ds` disables on-boot scans; only index new uploads +* `-v ~/music::r:c,d2ts` same except only affecting tags note: * the parser can finally handle `c,e2dsa,e2tsr` so you no longer have to `c,e2dsa:c,e2tsr` diff --git a/copyparty/__main__.py b/copyparty/__main__.py index 3762adde..604f89fe 100644 --- a/copyparty/__main__.py +++ b/copyparty/__main__.py @@ -350,6 +350,8 @@ def run_argparse(argv, formatter): \033[0mdatabase, general: \033[36me2d\033[35m sets -e2d (all -e2* args can be set using ce2* volflags) + \033[36md2ts\033[35m disables metadata collection for existing files + \033[36md2ds\033[35m disables onboot indexing, overrides -e2ds* \033[36md2t\033[35m disables metadata collection, overrides -e2t* \033[36md2d\033[35m disables all database stuff, overrides -e2* \033[36mnohash=\\.iso$\033[35m skips hashing file contents if path matches *.iso diff --git a/copyparty/authsrv.py b/copyparty/authsrv.py index 1658f6a0..8a933815 100644 --- a/copyparty/authsrv.py +++ b/copyparty/authsrv.py @@ -926,6 +926,14 @@ class AuthSrv(object): vol.flags["d2t"] = True vol.flags = {k: v for k, v in vol.flags.items() if not k.startswith(rm)} + # d2ds drops all onboot scans for a volume + for grp, rm in [["d2ds", "e2ds"], ["d2ts", "e2ts"]]: + if not vol.flags.get(grp, False): + continue + + vol.flags["d2ts"] = True + vol.flags = {k: v for k, v in vol.flags.items() if not k.startswith(rm)} + # mt* needs e2t so drop those too for grp, rm in [["e2t", "mt"]]: if vol.flags.get(grp, False):