feat(library and playback): Support for serverside channel plugins and hls streaming
This commit is contained in:
@@ -22,6 +22,7 @@ pub const MIGRATIONS: &[(&str, &str)] = &[
|
||||
("015_device_id", MIGRATION_015),
|
||||
("016_autoplay_max_episodes", MIGRATION_016),
|
||||
("017_downloads_resume_url", MIGRATION_017),
|
||||
("018_items_is_folder", MIGRATION_018),
|
||||
];
|
||||
|
||||
/// Initial schema migration
|
||||
@@ -680,3 +681,15 @@ const MIGRATION_017: &str = r#"
|
||||
ALTER TABLE downloads ADD COLUMN stream_url TEXT;
|
||||
ALTER TABLE downloads ADD COLUMN target_dir TEXT;
|
||||
"#;
|
||||
|
||||
/// Migration to record whether a cached item is a folder/container vs a playable
|
||||
/// leaf. Needed so channel items (which can be either) route to the player or to
|
||||
/// a browse list correctly. Existing cached rows predate the column and have an
|
||||
/// unknown folder flag, so we force a refresh by clearing their `synced_at`,
|
||||
/// causing the hybrid repository to re-fetch them from the server on next browse.
|
||||
const MIGRATION_018: &str = r#"
|
||||
ALTER TABLE items ADD COLUMN is_folder INTEGER DEFAULT 0;
|
||||
|
||||
-- Force re-fetch of all cached items so is_folder is populated from the server.
|
||||
UPDATE items SET synced_at = NULL;
|
||||
"#;
|
||||
|
||||
Reference in New Issue
Block a user