Go to file
byrongamatos 7cbbb262c1 refactor(server): extract the playlists routes into routers/playlists.py (R3)
The biggest router yet — 12 playlist routes + custom covers — and the first that
needs the config-path seam. server.py: 9,302 -> 9,085 (-217).

Three causally-linked pieces, all required for playlists:
- `config_dir` joins the appstate seam (the plan always put the path constants
  there; deferred in S3, needed now). It's env-derived, so the ~49
  pop-and-reimport fixtures reconfigure it for free — ZERO setattr retargeting.
  STATIC_DIR/SLOPPAK_CACHE_DIR (patched via setattr) stay in server.py until a
  router that reads them is extracted, and get retargeted then.
- `_clean_str` (pure request-field sanitizer, 14 callers) -> lib/reqfields.py;
  server.py imports it back. Unblocks wanted/saved/collections/profile/... later.
- routers/playlists.py: bodies verbatim, `@app`->`@router`, `meta_db`->
  `appstate.meta_db`, `CONFIG_DIR`->`appstate.config_dir`, `_clean_str` from
  reqfields, `_ART_CACHE_HEADERS` as a local const (art keeps server.py's).
  The two exclusive cover helpers (_playlist_cover_path/_url) move with it.

include_router at the original site; full 143-route table identical to
origin/main. One test retarget: test_playlists_api called
`server._playlist_cover_path` directly -> now imports it from routers.playlists
(reads appstate.config_dir, which the `server` fixture configures).

Verified: pyflakes clean; route table identical; pytest 2401 passed (28 in
playlists+collections+appstate); packaging guard 51 (auto-picked up reqfields);
eslint 0; boot smoke drives create/rename/add-song/cover-upload/serve/delete —
the cover writes 1.png under CONFIG_DIR THROUGH appstate.config_dir and serves
200 with an mtime cache-bust token; a wrong-typed name field still 400s via
_clean_str; demo untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-10 19:46:32 +02:00
.claude/skills Clean release snapshot 2026-06-16 18:47:13 +02:00
.github R0: module-migration rails (src/ serving, live-edit cache, scriptType loading, governance) (#812) 2026-07-08 10:14:40 +02:00
.specify R0: module-migration rails (src/ serving, live-edit cache, scriptType loading, governance) (#812) 2026-07-08 10:14:40 +02:00
content/starter Delete content/starter/beethoven-ode_to_joy.feedpak 2026-07-03 23:42:45 +02:00
data/progression Clean release snapshot 2026-06-16 18:47:13 +02:00
docs refactor(server): extract the playlists routes into routers/playlists.py (R3) 2026-07-10 19:46:32 +02:00
lib refactor(server): extract the playlists routes into routers/playlists.py (R3) 2026-07-10 19:46:32 +02:00
plugins fix(highway_3d): size Butterchurn output canvas buffer to fill the highway (#820) 2026-07-10 13:12:16 +02:00
scripts R0: module-migration rails (src/ serving, live-edit cache, scriptType loading, governance) (#812) 2026-07-08 10:14:40 +02:00
specs rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
static feat(audio): renderer-bus feeder — song audio into engine output under exclusive mode (Phase 2) (#828) 2026-07-09 22:51:09 +02:00
tests refactor(server): extract the playlists routes into routers/playlists.py (R3) 2026-07-10 19:46:32 +02:00
.dockerignore fix(build): move appstate.py + routers/ under lib/ so the desktop app ships them (#836) 2026-07-10 17:16:34 +02:00
.gitattributes Purge external-format terminology from code, tests and docs 2026-06-16 19:36:53 +01:00
.gitignore Bundle drum_highway_3d + keys_highway_3d as in-tree core plugins (#693) 2026-07-02 00:25:31 +02:00
build-proxmox-ct.sh rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
CHANGELOG.md refactor(server): extract the playlists routes into routers/playlists.py (R3) 2026-07-10 19:46:32 +02:00
CLAUDE.md R0: module-migration rails (src/ serving, live-edit cache, scriptType loading, governance) (#812) 2026-07-08 10:14:40 +02:00
CONTRIBUTING.md rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
docker-compose.nas.yml rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
docker-compose.yml fix(build): move appstate.py + routers/ under lib/ so the desktop app ships them (#836) 2026-07-10 17:16:34 +02:00
Dockerfile fix(build): move appstate.py + routers/ under lib/ so the desktop app ships them (#836) 2026-07-10 17:16:34 +02:00
eslint.config.js R0: module-migration rails (src/ serving, live-edit cache, scriptType loading, governance) (#812) 2026-07-08 10:14:40 +02:00
LICENSE Clean release snapshot 2026-06-16 18:47:13 +02:00
main.py rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
package-lock.json R0: module-migration rails (src/ serving, live-edit cache, scriptType loading, governance) (#812) 2026-07-08 10:14:40 +02:00
package.json R0: module-migration rails (src/ serving, live-edit cache, scriptType loading, governance) (#812) 2026-07-08 10:14:40 +02:00
playwright.config.ts Clean release snapshot 2026-06-16 18:47:13 +02:00
pyproject.toml Clean release snapshot 2026-06-16 18:47:13 +02:00
requirements-test.txt Clean release snapshot 2026-06-16 18:47:13 +02:00
requirements.txt Make the library loader sloppak/loose-only 2026-06-16 19:09:53 +01:00
server.py refactor(server): extract the playlists routes into routers/playlists.py (R3) 2026-07-10 19:46:32 +02:00
SUPPORTERS.md rename: slopsmith → feedBack, byron → got-feedBack (#537) 2026-06-23 11:03:01 +02:00
tailwind.config.js Re-enable the v3 "Support Us!" donate button (#727) 2026-07-03 00:21:10 +02:00
TODO.md docs: correct plugin URL casing after the feedBack rename (#576) 2026-06-23 11:20:23 +02:00
uv.lock Clean release snapshot 2026-06-16 18:47:13 +02:00
VERSION Bump version to 0.3.0-alpha.1 2026-07-03 13:41:50 +02:00