From e363077d30c47bb42adf39728f0f961cf1cee903 Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Tue, 10 Jan 2023 17:02:35 +0100 Subject: [PATCH] add extra extensions --- ffplayout-api/src/utils/files.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ffplayout-api/src/utils/files.rs b/ffplayout-api/src/utils/files.rs index 2db209b0..11c19166 100644 --- a/ffplayout-api/src/utils/files.rs +++ b/ffplayout-api/src/utils/files.rs @@ -94,8 +94,15 @@ pub async fn browser( id: i32, path_obj: &PathObject, ) -> Result { - let (config, _) = playout_config(conn, &id).await?; - let extensions = config.storage.extensions; + let (config, channel) = playout_config(conn, &id).await?; + let mut channel_extensions = channel + .extra_extensions + .split(',') + .map(|e| e.to_string()) + .collect::>(); + let mut extensions = config.storage.extensions; + extensions.append(&mut channel_extensions); + let (path, parent, path_component) = norm_abs_path(&config.storage.path, &path_obj.source); let mut obj = PathObject::new(path_component, Some(parent));