From b157a25b2dfff122908da1c89b7a620655521a64 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Fri, 24 Jul 2026 22:56:08 +0530 Subject: default download directory set to downloads folder --- SoundListItemWidget.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'SoundListItemWidget.py') diff --git a/SoundListItemWidget.py b/SoundListItemWidget.py index 194b633..3c62735 100644 --- a/SoundListItemWidget.py +++ b/SoundListItemWidget.py @@ -18,7 +18,7 @@ import sys import shutil from pathlib import Path -from PySide6.QtCore import Signal +from PySide6.QtCore import Signal, QStandardPaths from PySide6.QtWidgets import QFrame, QHBoxLayout, QLabel, QPushButton, QFileDialog from Soundboard import SoundboardSound @@ -64,14 +64,14 @@ class SoundListItemWidget(QFrame): layout.addWidget(self.btn_play) def download(self): + downloads_dir = Path(QStandardPaths.writableLocation(QStandardPaths.StandardLocation.DownloadLocation)) + selected_folder = QFileDialog.getSaveFileName( self, "Save Audio File", - self.sound.title + Path(self.sound.path).suffix, + str(downloads_dir / (self.sound.title + Path(self.sound.path).suffix)), "All Files (*)" ) if selected_folder: self.download_dest = Path(selected_folder[0]) - print(self.download_dest) - - shutil.copy2(self.sound.path, self.download_dest) + shutil.copy2(self.sound.path, self.download_dest) -- cgit v1.2.3