Skip to content

[SeerrNG #596] Caching, admin request tools, saved settings and branding uploads - #2

Closed
ncbudd wants to merge 6 commits into
mainfrom
next
Closed

ncbudd wants to merge 6 commits into
mainfrom
next

Conversation

@ncbudd

@ncbudd ncbudd commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

Next SeerrNG PR (consolidated)

This branch collects the changes for the next Lumen PR to SeerrNG. Tester PRs here that pass review are added to next, keeping each tester as the commit author. When it's ready, next goes to snapetech-org/seerrng as one PR. Don't merge this into main: lumen/ there is synced from SeerrNG.

Based on SeerrNG main f7bc03b4, which includes #595 (v3.72.21).

Included so far

  • Caching: keep recent answers instead of asking SeerrNG every time (Ncbudd)
    • Anything loaded in the last 3 minutes is reused without asking SeerrNG again. Anything up to a day old shows at once while it refreshes in the background.
    • Saved per account, so a reopened app or tab starts from what it showed last time. Signing out or switching account deletes it.
    • Making a request, or any other change, marks everything for refresh, so nothing keeps showing a title as not requested. Requests, quota, sign-in and public settings are always checked again.
    • Books, Audiobooks, Movies and Series show placeholder posters while the first page loads, instead of an empty page.
    • The paged lists keep #595's stale-response guards.
  • Everyone tab on Requests (tester feedback, Tatsu)
    • Admins and request managers see everyone's requests: all waiting ones first, then the newest, each with who asked. Waiting ones have Approve and Decline. The tab shows how many are waiting.
  • Request as (Tatsu)
    • The request sheet and Advanced options let admins pick who the request is for, so it shows in that person's list. Shown only to people SeerrNG lets do this: Admin, or Manage Users together with Manage Requests.
  • Library badge on title pages (Tatsu)
    • The poster on a title page gets the same corner glyph as posters elsewhere: a check when it's in the library, a clock when it's requested.
  • Save "Lumen settings for everyone" from the admin page (Tatsu)
    • A small nginx script (njs, already in the image) checks with SeerrNG that the person is an admin, then writes lumen-config.json into a mounted /lumen-data folder. It only accepts JSON objects up to 64 KB, sent as JSON. The saved file wins over a mounted one.
    • Without the folder, the page keeps the download and says how to set the folder up. The compose files and the install guide explain it.
  • Started downloads always show; 0% says Queued (Nick)
    • With a big download queue, the request actually downloading could be far past the newest requests Lumen lists. Both Requests lists now pull in every request whose download has started, and the Everyone tab puts them right after the waiting ones. Radarr and Sonarr call everything in the queue "downloading", so anything at 0% now says Queued, on request rows and on posters.
  • Change, Retry and Remove on the Everyone tab (Nick)
    • Change (waiting requests, and failed movie or series requests) opens a sheet with server, quality, folder, who it's for and, for a series, its seasons, starting from what the request has now. A waiting request is then approved or saved; a failed one is saved and tried again.
    • Retry for failed requests. Remove for any request, confirmed with a second click on the same button (no pop-up).
  • Upload the logo and tab icon (Tatsu, Nick)
    • With /lumen-data mounted, the admin settings page has Upload buttons. The image is checked by its first bytes (PNG, JPEG, WebP, SVG or ICO, up to 2 MB, SeerrNG admins only) and kept in /lumen-data/branding under a new name each time, so no browser shows an old copy. Its address is saved for everyone straight away, and other unsaved edits on the page stay unsaved.
    • /branding/ serves uploads first, then a mounted branding folder, with a CSP that lets nothing there run scripts.
  • Logo shape and a custom media server name (Tatsu, Please make the word "jellyfin" replacable globally #4)
    • branding.logoShape: rounded square (default), circle, or "as uploaded" (transparent, uncropped, keeps its width). Picked on the admin page with a live preview. The logo CSS now beats the play mark's rules, which put a custom logo on the accent square on the sign-in card.
    • mediaServerName replaces Plex / Jellyfin / Emby in every label, filter and the sign-in page.
  • Everyone shows every request (Nick)
    • SeerrNG's filters with counts (All, Waiting, Downloading, Failed, Available) and Show more, 20 at a time.

Testing

  • tsc --noEmit, build, unit tests and Playwright on desktop/iPhone/Android/tablet: 327 passed, 13 skipped, plus 22 unit tests (including the real-nginx proxy tests). New tests cover the cache (reuse, ask again after a request, drop on sign-out), Everyone with Approve/Decline and who can see it, Request as and who gets it, the title-page badge, and Save for everyone (saving, and the read-only folder note), started downloads and Queued, Change / Retry / Remove, and uploads.
  • Real Lumen image against a lab SeerrNG + Jellyfin, with real admin and family accounts:
    • Saving: no folder, a read-only folder and a writable one each report correctly. Signed out gets 401, a family member 403, a form post 403, bad JSON or an array 400, over 64 KB 413. An admin save writes the file, and it's served from then on.
    • Uploads: signed out 401, family 403, a text file posing as a PNG 415, 3 MB 413, an unknown kind 404. A second logo upload replaced and deleted the first. Uploads are served as images with a no-scripts CSP, and a mounted branding folder still works.
    • Change then Approve kept a family member's request in their name. Changing a series' seasons saved, and Remove deleted the request.
    • Everyone loaded in 2.3 s cold. Approve moved a family request out of waiting, and Request as listed the family account. Desktop and phone had no horizontal overflow.
  • SeerrNG Android app (Android 16 emulator): going to Movies and back, and a full close and reopen, asked SeerrNG for none of Discover's rows again. Back still works.
  • Running on a real server (request.ncbudd.org). Discover's second visit makes 1 call instead of 23. Library counts, narrators and requests match the previous build.

To add

  • Approved tester PRs from this repo

Lumen asked SeerrNG again for everything on every visit: going back to
Discover repeated all its calls, including one detail lookup per title in
"New on <server>". Besides being slow (SeerrNG's first lookup of a title
can take seconds), every call counts against SeerrNG's per-account rate
limit, so quick browsing could hit 429s.

- apiCache.ts: answers younger than 3 minutes are reused without asking;
  older ones (up to a day) show at once while a new answer loads. Saved
  per account in localStorage so a reopened app starts from what it last
  showed; signing out or switching account drops it.
- Any request or other change (POST/PUT/DELETE, another narrator) marks
  everything stale, so nothing keeps showing a title as not requested.
  Requests, quota, sign-in and public settings are always re-checked.
- useApi, the Discover rows, "New on <server>" (the finished row is saved
  too) and list pages use it. A failed refresh keeps the saved answer up.
- Books, Audiobooks, Movies and Series show placeholder posters while the
  first page loads, so a slow answer doesn't look like an empty page.

Checked in the SeerrNG Android app (emulator, Android 16): Movies and
Back, and a full close and reopen, ask SeerrNG for none of Discover's rows
again; Back still behaves.
…ttings

Tester feedback:

- Requests gets an Everyone tab for admins and request managers: every
  waiting request first, then the newest, each with who asked, and
  Approve / Decline on waiting ones. The tab shows how many are waiting.
- The request sheet and the Advanced options get "Request as" for people
  SeerrNG lets choose the requester (Admin, or Manage Users together with
  Manage Requests).
- Title pages show the posters' corner glyph on their poster: the check
  when it's in the library, the clock when requested.
- "Lumen settings for everyone" can be saved from the admin page. A small
  nginx script (njs, already in the image) checks with SeerrNG that the
  person is an admin, then writes lumen-config.json into a mounted
  /lumen-data folder. Without that folder the page keeps the download.
With a big download queue, the request that was actually downloading
could be far down the history, past the newest requests Lumen lists, so
the Requests page showed only queued titles at 0%. Both Requests lists
now also pull in every request whose download has started (from
SeerrNG's in-progress requests); the Everyone tab puts them right after
the ones waiting for approval, furthest along first.

Radarr and Sonarr report everything in the download client's queue as
"downloading". Requests and posters now say Queued while none of it is
here yet.
…ab icon

Mirrors snapetech consolidate/next 48d2ff30 and f6bfd8f0: admin request
actions on the Everyone tab (Change, Retry, Remove) and logo / tab icon
uploads on the admin settings page.
Tester feedback (Tatsu, #4):

- branding.logoShape frames the custom logo: "rounded" (default),
  "circle", or "raw" (the file as it is: transparent, uncropped, as wide
  as it is up to 160px). The admin settings page picks it, with a live
  preview. The logo CSS now beats the play mark's own rules, which gave a
  custom logo the accent square on the sign-in card.
- mediaServerName replaces Plex / Jellyfin / Emby in every label, filter
  and the sign-in page (up to 40 characters). Set on the admin page;
  empty keeps the real name.
@ncbudd ncbudd changed the title Next SeerrNG PR (consolidated) [SeerrNG #596] Caching, admin request tools, saved settings and branding uploads Nov 7, 2026
@ncbudd

ncbudd commented Nov 7, 2026

Copy link
Copy Markdown
Owner Author

Sent to SeerrNG as snapetech-org/seerrng#596. New tester PRs here go into the next consolidated PR.

The Everyone tab listed waiting requests, started downloads and only the
20 newest requests, so a big library (hundreds of requests) showed a
small slice. It now has SeerrNG's own filters with their counts (All,
Waiting, Downloading, Failed, Available) and a Show more button that
loads 20 more at a time (in SeerrNG pages of up to 100). All still puts
waiting requests and started downloads first; Downloading puts started
ones first.
@ncbudd

ncbudd commented Nov 7, 2026

Copy link
Copy Markdown
Owner Author

Merged upstream as snapetech-org/seerrng#596 (a03a2a04), with three review fixes from the maintainer: uploads keep earlier images, cache expiry is checked on every read, and the Everyone tab shows an error with Retry instead of an empty list. main now has it.

@ncbudd ncbudd closed this Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant