mirror of
https://github.com/got-feedBack/feedBack.git
synced 2026-07-22 21:01:40 +00:00
The library query surface (songs/albums/artists/stats/genres/tuning-names/ practice-suggestions), the provider list/art/sync endpoints, and collection CRUD move to lib/routers/library.py. The registry itself — LibraryProviderRegistry, LocalLibraryProvider, SmartCollectionProvider, the collection-provider lifecycle (_sync/_unregister_collection_provider), and the shared query/collection helpers (_library_filter_args, _split_csv, _sanitize_collection_rules, _safe_art_redirect_url, the filter-key sets) — moves to lib/library_registry.py. The PLUGIN CONTRACT is untouched: server.py still constructs the singleton (LocalLibraryProvider needs meta_db), still exposes register_library_provider / unregister_library_provider to plugins via plugin_context (with the per-plugin ownership scoping in plugins/__init__.py), and injects the registry + local provider into appstate. The router reads appstate.library_providers / appstate.local_library_provider at call time; the provider classes are duck-typed so no plugin imports a base class. Acyclic: library_registry imports routers.art (for LocalLibraryProvider.get_art) + appstate, never server. server.py: 3,692 -> 2,925 (-767). Verified: pyflakes clean; ORDERED route table identical set (library block mounts at one site — all exact/specific-path, no catch-all, no shadowing); full pytest 2397 passed (incl the plugin register/unregister + collection-as-provider tests). eslint 0. Boot smoke: /api/library + providers list "local"; a created collection surfaces as a `collection:N` provider through the seam; collection CRUD clean. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| benchmarks | ||
| diagnostics | ||
| skills | ||
| 3dhighway-open-string-double-sustain.jpg | ||
| capability-domains.md | ||
| capability-recipes.md | ||
| capability-review-preflight.md | ||
| capability-roadmap.md | ||
| capability-safety-matrix.md | ||
| diagnostics-bundle-spec.md | ||
| host-theme-contract.md | ||
| library.png | ||
| NOTE_FAILURE_PLAN.md | ||
| NOTE_FAILURE_SPEC.md | ||
| note-detect-tuning.md | ||
| perf-baseline.md | ||
| player-2d.jpg | ||
| player-3d.jpg | ||
| player-3d.webp | ||
| plugin-capability-inventory.md | ||
| plugin-manifest.schema.json | ||
| plugin-modules.md | ||
| plugin-styles.md | ||
| plugin-v3-ui.md | ||
| size-exemptions.md | ||
| sloppak-hand-editing.md | ||
| sloppak-spec.md | ||
| working-tuning-on-device-tests.md | ||