[READ-ONLY] Mirror of https://github.com/probablykasper/ferrum. Music library app for Mac, Linux and Windows ferrum.kasper.space
electron linux macos music music-library music-player napi windows
0

Configure Feed

Select the types of activity you want to include in your feed.

Fix trash not supported on android

Kasper (Mar 5, 2026, 1:28 PM +0100) cfa8937c 0ddbbcf7

+14 -8
+3 -1
Cargo.toml
··· 38 38 alphanumeric-sort = "1.5" 39 39 linked-hash-map = { version = "0.5", features = ["serde_impl"] } 40 40 atomicwrites = "0.4" 41 - trash = "5.1" 42 41 plist = "1.5" 43 42 tokio = { version = "1.28", features = ["macros"] } 44 43 time = { version = "0.3", features = ["serde", "serde-well-known"] } ··· 59 58 mimalloc = "0.1.48" 60 59 specta = "=2.0.0-rc.22" 61 60 tauri-plugin-dialog = "2.6.0" 61 + 62 + [target.'cfg(not(target_os = "android"))'.dependencies] 63 + trash = "5.1"
+11 -7
src-native/playlists.rs
··· 203 203 } 204 204 205 205 pub fn delete_file(path: &PathBuf) -> Result<()> { 206 - #[allow(unused_mut)] 207 - let mut trash_context = trash::TrashContext::new(); 206 + if cfg!(target_os = "android") { 207 + bail!("Unsupported"); 208 + } else { 209 + #[allow(unused_mut)] 210 + let mut trash_context = trash::TrashContext::new(); 208 211 209 - #[cfg(target_os = "macos")] 210 - trash_context.set_delete_method(trash::macos::DeleteMethod::NsFileManager); 212 + #[cfg(target_os = "macos")] 213 + trash_context.set_delete_method(trash::macos::DeleteMethod::NsFileManager); 211 214 212 - trash_context 213 - .delete(&path) 214 - .with_context(|| format!("Failed moving file to trash: {}", path.to_string_lossy())) 215 + trash_context 216 + .delete(&path) 217 + .with_context(|| format!("Failed moving file to trash: {}", path.to_string_lossy())) 218 + } 215 219 } 216 220 217 221 #[napi(js_name = "delete_tracks_with_item_ids")]