diff --git a/dots/.config/quickshell/ii/modules/sidebarLeft/Anime.qml b/dots/.config/quickshell/ii/modules/sidebarLeft/Anime.qml index cab251cb8..c673f6304 100644 --- a/dots/.config/quickshell/ii/modules/sidebarLeft/Anime.qml +++ b/dots/.config/quickshell/ii/modules/sidebarLeft/Anime.qml @@ -23,15 +23,6 @@ Item { property var suggestionQuery: "" property var suggestionList: [] - Connections { - target: Config - function onReadyChanged() { - if (Config.options.policies.weeb !== 0) { - Quickshell.execDetached(["bash", "-c", `mkdir -p '${root.downloadPath}' && mkdir -p '${root.nsfwPath}'`]) - } - } - } - Connections { target: Booru function onTagSuggestion(query, suggestions) { diff --git a/dots/.config/quickshell/ii/modules/sidebarLeft/anime/BooruImage.qml b/dots/.config/quickshell/ii/modules/sidebarLeft/anime/BooruImage.qml index 262321999..99f6f1ab3 100644 --- a/dots/.config/quickshell/ii/modules/sidebarLeft/anime/BooruImage.qml +++ b/dots/.config/quickshell/ii/modules/sidebarLeft/anime/BooruImage.qml @@ -28,7 +28,7 @@ Button { Process { id: downloadProcess running: false - command: ["bash", "-c", `[ -f ${root.filePath} ] || curl -sSL '${root.imageData.preview_url ?? root.imageData.sample_url}' -o '${root.filePath}'`] + command: ["bash", "-c", `mkdir -p '${root.previewDownloadPath}' && [ -f ${root.filePath} ] || curl -sSL '${root.imageData.preview_url ?? root.imageData.sample_url}' -o '${root.filePath}'`] onExited: (exitCode, exitStatus) => { imageObject.source = `${previewDownloadPath}/${root.fileName}` } @@ -170,9 +170,10 @@ Button { Layout.fillWidth: true buttonText: Translation.tr("Download") onClicked: { - root.showActions = false + root.showActions = false; + const targetPath = root.imageData.is_nsfw ? root.nsfwPath : root.downloadPath; Quickshell.execDetached(["bash", "-c", - `curl '${root.imageData.file_url}' -o '${root.imageData.is_nsfw ? root.nsfwPath : root.downloadPath}/${root.fileName}' && notify-send '${Translation.tr("Download complete")}' '${root.downloadPath}/${root.fileName}' -a 'Shell'` + `mkdir -p '${targetPath}' && curl '${root.imageData.file_url}' -o '${targetPath}/${root.fileName}' && notify-send '${Translation.tr("Download complete")}' '${root.downloadPath}/${root.fileName}' -a 'Shell'` ]) } }