From dd6e9ea70c55ab203ecd9a05590269c259d0df09 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 23 Dec 2024 17:16:56 +0000 Subject: [PATCH] when idp is enabled, always daemon(up2k-rescan) fixes a bug reported on discord; 1. run with `--idp-h-usr=iu -v=srv::A` 2. upload a file with up2k; this succeeds 3. announce an idp user: `curl -Hiu:a 127.1:3923` 4. upload another file; fails with "fs-reload" the idp announce would `up2k.reload` which raises the `reload_flag` and `rescan_cond`, but there is nothing listening on `rescan_cond` because `have_e2d` was false must assume e2d if idp is enabled, because `have_e2d` will only be true if there are non-idp volumes with e2d enabled --- copyparty/authsrv.py | 4 ++-- copyparty/up2k.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/copyparty/authsrv.py b/copyparty/authsrv.py index 65604ff5..62912cfd 100644 --- a/copyparty/authsrv.py +++ b/copyparty/authsrv.py @@ -2181,11 +2181,11 @@ class AuthSrv(object): if not self.args.no_voldump: self.log(t) - if have_e2d: + if have_e2d or self.args.idp_h_usr: t = self.chk_sqlite_threadsafe() if t: self.log("\n\033[{}\033[0m\n".format(t)) - + if have_e2d: if not have_e2t: t = "hint: enable multimedia indexing (artist/title/...) with argument -e2ts" self.log(t, 6) diff --git a/copyparty/up2k.py b/copyparty/up2k.py index f1de8141..2e3a8e1a 100644 --- a/copyparty/up2k.py +++ b/copyparty/up2k.py @@ -856,9 +856,9 @@ class Up2k(object): self.iacct = self.asrv.iacct self.grps = self.asrv.grps + have_e2d = self.args.idp_h_usr vols = list(all_vols.values()) t0 = time.time() - have_e2d = False if self.no_expr_idx: modified = False