(
app: AppHandle,
db: State<Database>,
window_handler: State<WindowHandler>,
id: String,
)
| 35 | #[tauri_invoke_proc::parse_tauri_command] |
| 36 | #[tauri::command(async)] |
| 37 | pub fn export_playlist( |
| 38 | app: AppHandle, |
| 39 | db: State<Database>, |
| 40 | window_handler: State<WindowHandler>, |
| 41 | id: String, |
| 42 | ) -> Result<()> { |
| 43 | info!("Exporting playlist"); |
| 44 | let exported = db.export_playlist(id)?; |
| 45 | let selected_file = window_handler.open_save_file(app)?; |
| 46 | trace!("Exported playlist"); |
| 47 | Ok(fs::write(selected_file, exported)?) |
| 48 | } |
| 49 | |
| 50 | generate_command!(insert_songs, Database, Vec<Song>, songs: Vec<Song>); |
| 51 | generate_command!(remove_songs, Database, (), songs: Vec<String>); |
nothing calls this directly
no test coverage detected