add extra extensions

This commit is contained in:
jb-alvarado 2023-01-10 17:02:35 +01:00
parent 9da38e8bb2
commit e363077d30

View File

@ -94,8 +94,15 @@ pub async fn browser(
id: i32,
path_obj: &PathObject,
) -> Result<PathObject, ServiceError> {
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::<Vec<String>>();
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));