Skip to content

Commit

Permalink
when idp is enabled, always daemon(up2k-rescan)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
9001 committed Dec 23, 2024
1 parent 87598dc commit dd6e9ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions copyparty/authsrv.py
Original file line number Diff line number Diff line change
Expand Up @@ -2181,11 +2181,11 @@ def _reload(self, verbosity: int = 9) -> None:
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)
Expand Down
2 changes: 1 addition & 1 deletion copyparty/up2k.py
Original file line number Diff line number Diff line change
Expand Up @@ -856,9 +856,9 @@ def init_indexes(
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
Expand Down

0 comments on commit dd6e9ea

Please sign in to comment.