The wishlist list endpoint previously loaded and JSON-decoded the full wishlist, filtered by category in Python, then sliced in memory. Cost grew linearly with wishlist size on every page request. get_wishlist_tracks now accepts offset and category parameters, both applied in SQL via LIMIT/OFFSET and json_extract. get_wishlist_count also accepts category so COUNT(*) matches the filtered page. The API endpoint uses these to return only the requested page. Backward compatible: other callers (core/wishlist_service) pass no offset/category and still receive the full list. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| music_database.py | ||