feat(transcoding): add FFmpeg HLS transcoding support

- Introduced `TranscodeManager` for managing on-demand transcoding of local video files.
- Added configuration options for transcoding in `Config` and `LocalFilesConfig`.
- Implemented new API routes for managing transcoding settings, stats, and cache.
- Updated `LocalFilesProvider` to support transcoding capabilities.
- Created frontend components for managing transcode settings and displaying stats.
- Added database migration for transcode settings.
- Enhanced existing routes and DTOs to accommodate new transcoding features.
This commit is contained in:
2026-03-15 00:34:23 +01:00
parent ead65e6be2
commit 1102e385f3
23 changed files with 865 additions and 31 deletions

View File

@@ -28,6 +28,12 @@ pub struct AppState {
/// Index for the local-files provider, used by the rescan route.
#[cfg(feature = "local-files")]
pub local_index: Option<Arc<infra::LocalIndex>>,
/// TranscodeManager for FFmpeg HLS transcoding (requires TRANSCODE_DIR).
#[cfg(feature = "local-files")]
pub transcode_manager: Option<Arc<infra::TranscodeManager>>,
/// SQLite pool for transcode settings CRUD.
#[cfg(feature = "local-files")]
pub sqlite_pool: Option<sqlx::SqlitePool>,
}
impl AppState {
@@ -110,6 +116,10 @@ impl AppState {
config: Arc::new(config),
#[cfg(feature = "local-files")]
local_index: None,
#[cfg(feature = "local-files")]
transcode_manager: None,
#[cfg(feature = "local-files")]
sqlite_pool: None,
})
}
}