Skip to content

Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.

feat: add hotkey_enabled and hotkey_binding options to DownloadSettings

Tonho5d4048ae1e58
diff --git a/src-tauri/src/models/settings.rs b/src-tauri/src/models/settings.rs
index 0175bd69..9942ca60 100644
--- a/src-tauri/src/models/settings.rs
+++ b/src-tauri/src/models/settings.rs
@@ -37,6 +37,10 @@ pub struct DownloadSettings {
pub organize_by_platform: bool,
#[serde(default)]
pub download_subtitles: bool,
+ #[serde(default)]
+ pub hotkey_enabled: bool,
+ #[serde(default = "default_hotkey_binding")]
+ pub hotkey_binding: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -71,6 +75,10 @@ fn default_filename_template() -> String {
"%(title).200s [%(id)s].%(ext)s".into()
}
+fn default_hotkey_binding() -> String {
+ "CmdOrCtrl+Shift+D".into()
+}
+
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct TelegramSettings {
pub concurrent_downloads: u32,
@@ -107,6 +115,8 @@ impl Default for AppSettings {
filename_template: default_filename_template(),
organize_by_platform: false,
download_subtitles: false,
+ hotkey_enabled: false,
+ hotkey_binding: default_hotkey_binding(),
},
advanced: AdvancedSettings {
max_concurrent_segments: 20,