Add JSON config, DB-backed library options, and docs #6

Merged
wjones merged 6 commits from development into main 2026-04-30 15:58:35 -04:00
Owner

Pull Request Description

Summary

This PR consolidates six commits implementing significant improvements to PostgreSQL integration with Jellyfin, focusing on performance optimization, schema refinement, and authentication enhancements.

Key Changes

1. PostgreSQL Dead Tuple Handling Optimization (57d6342)

  • Introduced bulk operation extensions and transaction helpers for efficient, batched EF Core operations
  • Refactored MediaStreamInfo schema by splitting audio/video details into dedicated tables
  • Reduces table bloat and improves update performance
  • Added migration for data movement and schema changes
  • Enhanced PostgreSQL provider configuration with comprehensive documentation and monitoring guides

2. WebSocket Token Authentication (4ba580a)

  • Implemented WebSocket token authentication via api_key query parameter
  • Merged feature branch with comprehensive pull request review (PR #5)

3. Database-Backed Library Options & JSON Config (e81c127)

  • Added JSON-based config loading with XML fallback for DB and library options
  • Implemented LibraryOptionsRepository with EF Core, migrations, and entity mapping
  • Updated CollectionFolder to use DB-backed options with automatic XML fallback/backfill
  • Registered repository in dependency injection and initialized at startup
  • Uses EF execution strategy for transactional database operations
  • Added comprehensive documentation:
    • DATABASE_MIGRATION.md
    • LIBRARY_OPTIONS_DB_DESIGN.md
    • WEBSOCKET_AUTHENTICATION.md
    • database.json.example

4. Schema & Documentation Updates

  • Updated database schema SQL files
  • Added test coverage for JSON config loader
  • Improved migration documentation
  • Fixed code analysis warnings in project configuration and test files

Testing

  • Tests added for JSON config loader functionality
  • Test naming warnings addressed in project configuration

Benefits

  • Improved PostgreSQL performance through optimized schema design
  • Enhanced security with WebSocket token authentication
  • Flexible configuration management via database-backed options
  • Better data organization reducing table bloat
  • Comprehensive documentation for future maintenance

Breaking Changes

None expected. JSON config loading includes XML fallback compatibility.

Related Issues

  • Feature Branch: feature/websocket-token-auth
## Pull Request Description ### Summary This PR consolidates six commits implementing significant improvements to PostgreSQL integration with Jellyfin, focusing on performance optimization, schema refinement, and authentication enhancements. ### Key Changes #### 1. **PostgreSQL Dead Tuple Handling Optimization** (57d6342) - Introduced bulk operation extensions and transaction helpers for efficient, batched EF Core operations - Refactored MediaStreamInfo schema by splitting audio/video details into dedicated tables - Reduces table bloat and improves update performance - Added migration for data movement and schema changes - Enhanced PostgreSQL provider configuration with comprehensive documentation and monitoring guides #### 2. **WebSocket Token Authentication** (4ba580a) - Implemented WebSocket token authentication via `api_key` query parameter - Merged feature branch with comprehensive pull request review (PR #5) #### 3. **Database-Backed Library Options & JSON Config** (e81c127) - Added JSON-based config loading with XML fallback for DB and library options - Implemented `LibraryOptionsRepository` with EF Core, migrations, and entity mapping - Updated `CollectionFolder` to use DB-backed options with automatic XML fallback/backfill - Registered repository in dependency injection and initialized at startup - Uses EF execution strategy for transactional database operations - Added comprehensive documentation: - `DATABASE_MIGRATION.md` - `LIBRARY_OPTIONS_DB_DESIGN.md` - `WEBSOCKET_AUTHENTICATION.md` - `database.json.example` #### 4. **Schema & Documentation Updates** - Updated database schema SQL files - Added test coverage for JSON config loader - Improved migration documentation - Fixed code analysis warnings in project configuration and test files ### Testing - Tests added for JSON config loader functionality - Test naming warnings addressed in project configuration ### Benefits - ✅ Improved PostgreSQL performance through optimized schema design - ✅ Enhanced security with WebSocket token authentication - ✅ Flexible configuration management via database-backed options - ✅ Better data organization reducing table bloat - ✅ Comprehensive documentation for future maintenance ### Breaking Changes None expected. JSON config loading includes XML fallback compatibility. ### Related Issues - Feature Branch: `feature/websocket-token-auth`
wjones added 6 commits 2026-04-30 15:58:00 -04:00
- Add JSON-based config loading with XML fallback for DB and library options
- Implement LibraryOptionsRepository with EF Core, migrations, and entity
- Update CollectionFolder to use DB-backed options with XML fallback/backfill
- Register repository in DI and initialize at startup
- Use EF execution strategy for transactional DB operations
- Suppress code analysis warnings in .csproj and test files
- Add DATABASE_MIGRATION.md, LIBRARY_OPTIONS_DB_DESIGN.md, and WEBSOCKET_AUTHENTICATION.md
- Add database.json.example and improve migration docs
- Add tests for JSON config loader and update test naming warnings
Reviewed-on: #5
Introduce bulk operation extensions and transaction helpers for efficient, batched EF Core operations. Refactor MediaStreamInfo schema by splitting audio/video details into dedicated tables, reducing table bloat and improving update performance. Add migration for data movement and schema changes. Update EF Core models and context for new structure. Enhance PostgreSQL provider configuration and add comprehensive documentation and monitoring guides. Includes minor middleware and code cleanups.
wjones merged commit 372d97885f into main 2026-04-30 15:58:35 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wjones/pgsql-jellyfin#6