v0.2.11 - Backend Reliability & Bug Fixes
Backend Improvements
Uniform AI Provider Interface
- All AI providers now implement a consistent
complete()interface with uniform timeout/retry logic - Exponential backoff retry logic for API calls (3 retries with 1s, 2s, 4s delays)
- Timeout properly passed to Cohere via
request_optionsand Claude viawith_options()
Database Performance
- Bulk query methods eliminate N+1 patterns:
get_tracks_by_ids,get_artists_by_ids,get_albums_by_ids,get_track_details_by_ids - SQLite connections now enable foreign keys, WAL journal mode, and busy timeout
- Proper UPSERT pattern maintains stable row IDs
- Incremental FAISS index updates instead of full rebuilds
Sync Reliability
- 'Unknown Artist' and 'Unknown Album' fallback entities for orphaned items during sync
- Album→artist mapping uses Plex API's
parentRatingKeyinstead of path parsing - Tag preservation during sync using COALESCE pattern
Bug Fixes
CLI Fixes
- Database lock error: Fixed
plexmix createcommand failing when saving playlist to Plex (was opening duplicate DB connections) - API key requirement:
plexmix createno longer requires AI provider API keys for playlist generation
UI Fixes
- Stalling during generation: Fixed UI freezing for ~50 seconds during playlist generation (model load moved off main thread)
- Plex playlist creation: Fixed malformed URLs when saving playlists to Plex (string plex_key now properly converted to integer)
Search & Ranking
- FTS search now uses
bm25()function for proper relevance ranking instead of deprecatedrank
Testing
- Added comprehensive regression tests for database integrity, sync correctness, and provider compatibility
- All 109 tests passing ✅
Files Changed
src/plexmix/ai/*.py- Uniform complete() interface with timeout/retrysrc/plexmix/cli/main.py- Database lock fixsrc/plexmix/database/sqlite_manager.py- UPSERT pattern, FTS bm25()src/plexmix/plex/sync.py- Unknown entity fallbackssrc/plexmix/plex/client.py- Integer plex_key conversionsrc/plexmix/ui/states/generator_state.py- Non-blocking model loadtests/test_sync.py,tests/test_tagging.py- New regression tests
Installation
```bash
pip install plexmix==0.2.11
```
Or with UI:
```bash
pip install plexmix[ui]==0.2.11
```