Skip to content

v0.2.11 - Backend Reliability & Bug Fixes

Choose a tag to compare

@izzoa izzoa released this 27 Dec 21:11
· 73 commits to master since this release

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_options and Claude via with_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 parentRatingKey instead of path parsing
  • Tag preservation during sync using COALESCE pattern

Bug Fixes

CLI Fixes

  • Database lock error: Fixed plexmix create command failing when saving playlist to Plex (was opening duplicate DB connections)
  • API key requirement: plexmix create no 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 deprecated rank

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/retry
  • src/plexmix/cli/main.py - Database lock fix
  • src/plexmix/database/sqlite_manager.py - UPSERT pattern, FTS bm25()
  • src/plexmix/plex/sync.py - Unknown entity fallbacks
  • src/plexmix/plex/client.py - Integer plex_key conversion
  • src/plexmix/ui/states/generator_state.py - Non-blocking model load
  • tests/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
```