desktop support to modify selected files
This commit is contained in:
parent
dd53eda662
commit
c6d3a972c4
2 changed files with 22 additions and 4 deletions
|
|
@ -293,6 +293,17 @@ async fn torrent_action_start(
|
|||
state.api()?.api_torrent_action_start(id)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
async fn torrent_action_configure(
|
||||
state: tauri::State<'_, State>,
|
||||
id: usize,
|
||||
only_files: Vec<usize>,
|
||||
) -> Result<EmptyJsonResponse, ApiError> {
|
||||
state
|
||||
.api()?
|
||||
.api_torrent_action_update_only_files(id, &only_files.into_iter().collect())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn get_version() -> &'static str {
|
||||
env!("CARGO_PKG_VERSION")
|
||||
|
|
@ -325,6 +336,7 @@ async fn start() {
|
|||
torrent_action_pause,
|
||||
torrent_action_forget,
|
||||
torrent_action_start,
|
||||
torrent_action_configure,
|
||||
torrent_create_from_base64_file,
|
||||
get_version,
|
||||
config_default,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue