docs(media): the Jellyfin scan 401 was curl-config quoting, not the server
Corrects the lesson written an hour ago, which said a non-204 was transient and should simply be re-issued. It is reproducible and mechanical: `printf` with `\"` inside the single-quoted format string drops the backslash, curl then ends the quoted value at the first bare quote, and Jellyfin receives `Authorization: MediaBrowser Token=` with an empty key. Both forms were run against the host in one pass — `\\"` answers 204, `\"` answers 401 — so the block's double backslashes are load-bearing, and the handoff script that deviated left a 58k-move library unscanned for 40 minutes. Also the trap that diagnosis walked into: a second accepted refresh while a scan is running moves `Scan Media Library` to `Cancelling` and the pass starts over. One accepted request is the procedure; wait it out.
This commit is contained in:
1 parent
1e1527d101
commit
02a568fb97
1 file changed
+3
-3
@@ -100,8 +100,8 @@ podman exec -i plex sh -c 'read -r T
|
||||
|
||||
[[Jellyfin]]'s scan key lives in `~/.config/secrets/jellyfin` (mode 600; the
|
||||
same value is `JELLYFIN_API_KEY` in the ignored `dankserver/.env`). It rides a
|
||||
mode-600 curl config, never a header argument, and it must use the
|
||||
`MediaBrowser` form — Jellyfin 12.4 refuses a bare `X-Emby-Token` for any key:
|
||||
mode-600 curl config, never a header argument, in the `MediaBrowser` form —
|
||||
Jellyfin 12.4 refuses a bare `X-Emby-Token`, and the backslashes below matter:
|
||||
|
||||
```bash
|
||||
umask 077
|
||||
@@ -113,7 +113,7 @@ curl -s -K /tmp/jf.hdr -o /dev/null -w "jellyfin scan: %{http_code}\n"
|
||||
shred -u /tmp/jf.hdr
|
||||
```
|
||||
|
||||
`204` is acceptance — anything else is no scan queued, `401` included (a handoff logged `401` with the same key and form that answered `200` seconds later), so re-issue rather than diagnose. The scan then runs on the server's own schedule.
|
||||
`204` is acceptance; anything else queued no scan, so re-issue it. A `401` from a key that answers `200` on a hand-typed request is this block's quoting, not the server: bash `printf` collapses `\"` to `"`, curl ends the quoted string at that quote, and Jellyfin receives `Authorization: MediaBrowser Token=` with nothing after it. Both forms were run against this host: `\\"` answers `204`, `\"` answers `401`. One accepted refresh is the whole procedure — a second one while a scan runs moves `Scan Media Library` to `Cancelling` and the pass starts over, so wait it out instead of poking it.
|
||||
|
||||
### Proving the move landed
|
||||
|
||||
|
||||
Reference in new issue
Block a user