Add file metadata command

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/4/head
trivernis 3 years ago
parent 6730094810
commit f74bac100b

@ -1,6 +1,6 @@
[package]
name = "mediarepo-api"
version = "0.24.0"
version = "0.24.1"
edition = "2018"
license = "gpl-3"

@ -97,6 +97,17 @@ pub async fn get_file_thumbnails(
Ok(thumbs)
}
#[tauri::command]
pub async fn get_file_metadata(
api_state: ApiAccess<'_>,
id: i64,
) -> PluginResult<FileMetadataResponse> {
let api = api_state.api().await?;
let metadata = api.file.get_file_metadata(FileIdentifier::ID(id)).await?;
Ok(metadata)
}
#[tauri::command]
pub async fn update_file_name(
api_state: ApiAccess<'_>,

@ -65,7 +65,8 @@ impl<R: Runtime> MediarepoPlugin<R> {
get_all_namespaces,
get_files,
get_repo_metadata,
get_size
get_size,
get_file_metadata
]),
}
}

Loading…
Cancel
Save