diff --git a/Cargo.lock b/Cargo.lock index 37c66b77..7a2d82d8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1292,7 +1292,7 @@ checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "ffplayout" -version = "0.22.2" +version = "0.22.3" dependencies = [ "chrono", "clap", @@ -1314,7 +1314,7 @@ dependencies = [ [[package]] name = "ffplayout-api" -version = "0.22.2" +version = "0.22.3" dependencies = [ "actix-files", "actix-multipart", @@ -1357,7 +1357,7 @@ dependencies = [ [[package]] name = "ffplayout-lib" -version = "0.22.2" +version = "0.22.3" dependencies = [ "chrono", "crossbeam-channel", @@ -3587,7 +3587,7 @@ dependencies = [ [[package]] name = "tests" -version = "0.22.2" +version = "0.22.3" dependencies = [ "chrono", "crossbeam-channel", diff --git a/Cargo.toml b/Cargo.toml index b7f41d20..df1ca2fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ default-members = ["ffplayout-api", "ffplayout-engine", "tests"] resolver = "2" [workspace.package] -version = "0.22.2" +version = "0.22.3" license = "GPL-3.0" repository = "https://github.com/ffplayout/ffplayout" authors = ["Jonathan Baecker "] diff --git a/assets/ffplayout.toml b/assets/ffplayout.toml index db516622..c7ee82ea 100644 --- a/assets/ffplayout.toml +++ b/assets/ffplayout.toml @@ -118,7 +118,7 @@ help_text = """'filler' is for playing instead of a missing file or fill the end to pick files randomly.""" path = "/var/lib/ffplayout/tv-media" filler = "/var/lib/ffplayout/tv-media/filler/filler.mp4" -extensions = ["mp4", "mkv"] +extensions = ["mp4", "mkv", "webm"] shuffle = true [text] @@ -131,7 +131,7 @@ add_text = true text_from_filename = false fontfile = "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf" style = "x=(w-tw)/2:y=(h-line_h)*0.9:fontsize=24:fontcolor=#ffffff:box=1:boxcolor=#000000:boxborderw=4" -regex = "^.+[/\\](.*)(.mp4|.mkv)$" +regex = "^.+[/\\](.*)(.mp4|.mkv|.webm)$" [task] help_text = """Run an external program with a given media object. The media object is in json format \ diff --git a/ffplayout-api/src/utils/playlist.rs b/ffplayout-api/src/utils/playlist.rs index 55022843..bb5390e7 100644 --- a/ffplayout-api/src/utils/playlist.rs +++ b/ffplayout-api/src/utils/playlist.rs @@ -35,13 +35,22 @@ pub async fn write_playlist( ) -> Result { let (config, _) = playout_config(conn, &id).await?; let date = json_data.date.clone(); - let mut playlist_path = PathBuf::from(&config.playlist.path); + let mut playlist_path = config.playlist.path; let d: Vec<&str> = date.split('-').collect(); - playlist_path = playlist_path - .join(d[0]) - .join(d[1]) - .join(date.clone()) - .with_extension("json"); + + if !playlist_path + .extension() + .and_then(|ext| ext.to_str()) + .map(|ext| ext.eq_ignore_ascii_case("json")) + .unwrap_or(false) + { + playlist_path = playlist_path + .join(d[0]) + .join(d[1]) + .join(date.clone()) + .with_extension("json"); + } + let mut file_exists = false; if let Some(p) = playlist_path.parent() { diff --git a/ffplayout-frontend b/ffplayout-frontend index 1f236dfe..390544ae 160000 --- a/ffplayout-frontend +++ b/ffplayout-frontend @@ -1 +1 @@ -Subproject commit 1f236dfe54ab027cbaaf0280e5520f4626291e06 +Subproject commit 390544ae3ad4494667a2c6c2f3385412e1e7eac0