Skip to content

Commit

Permalink
add extra extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
jb-alvarado committed Jan 10, 2023
1 parent 9da38e8 commit e363077
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions ffplayout-api/src/utils/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down

0 comments on commit e363077

Please sign in to comment.