feat(gui): support for soundpad:// uri (#123)

* feat(gui): support for soundpad:// uri

* fix: flatpak

* do not open gui when downloading file
This commit is contained in:
Tarasov Aleksandr
2026-05-28 00:58:03 +03:00
committed by GitHub
parent 695c83c9e6
commit 5e47e7d6fb
9 changed files with 1382 additions and 14 deletions
+12
View File
@@ -9,6 +9,7 @@ use crate::{
};
use anyhow::{Result, anyhow};
use std::{
path::PathBuf,
sync::{Arc, Mutex},
time::Instant,
};
@@ -36,6 +37,17 @@ pub fn make_request_async(request: Request) {
});
}
pub fn ensure_pwsp_audio_dir() -> PathBuf {
let audio_dir = dirs::audio_dir().unwrap_or("~/Music".into());
let pwsp_audio_dir = audio_dir.join("PWSP");
if !pwsp_audio_dir.exists() {
std::fs::create_dir_all(&pwsp_audio_dir).ok();
}
pwsp_audio_dir
}
pub fn format_time_pair(position: f32, duration: f32) -> String {
fn format_time(seconds: f32) -> String {
let total_seconds = seconds.round() as u32;