Skip to content

Commit 33d2c02

Browse files
authored
radio@driglu4it: Fix single quotes not escaped (#6539)
* Make yt-dlp the default CLI tool
1 parent 8868922 commit 33d2c02

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

radio@driglu4it/files/radio@driglu4it/4.6/radio-applet.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4271,7 +4271,7 @@ const notifyYouTubeDownloadFinished = (props) => {
42714271
buttons: [
42724272
{
42734273
text: "Play",
4274-
onClick: () => YoutubeDownloadManager_spawnCommandLine(`xdg-open '${downloadPath}'`),
4274+
onClick: () => YoutubeDownloadManager_spawnCommandLine(`xdg-open '${downloadPath.replaceAll("'", "'\\''")}'`),
42754275
},
42764276
],
42774277
});
@@ -4353,7 +4353,6 @@ const moveFileFromTmpDir = (props) => {
43534353
onFileMoved({ targetFilePath, fileAlreadyExist: true });
43544354
return;
43554355
}
4356-
// @ts-ignore
43574356
tmpFile.move(YoutubeDownloadManager_File.parse_name(targetFilePath), FileCopyFlags.BACKUP, null, null);
43584357
onFileMoved({ targetFilePath, fileAlreadyExist: false });
43594358
};

radio@driglu4it/files/radio@driglu4it/4.6/settings-schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@
176176
"type": "combobox",
177177
"description": "YouTube Download CLI tool",
178178
"tooltip": "The CLI tool used to download songs from YouTube",
179-
"default": "youtube-dl",
179+
"default": "yt-dlp",
180180
"options": {
181181
"yt-dlp": "yt-dlp",
182182
"youtube-dl": "youtube-dl"

radio@driglu4it/src/services/youtubeDownload/YoutubeDownloadManager.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const notifyYouTubeDownloadFinished = (props: {
7474
buttons: [
7575
{
7676
text: "Play",
77-
onClick: () => spawnCommandLine(`xdg-open '${downloadPath}'`),
77+
onClick: () => spawnCommandLine(`xdg-open '${downloadPath.replaceAll("'", "'\\''")}'`),
7878
},
7979
],
8080
}
@@ -196,7 +196,6 @@ const moveFileFromTmpDir = (props: {
196196
return;
197197
}
198198

199-
// @ts-ignore
200199
tmpFile.move(
201200
File.parse_name(targetFilePath),
202201
FileCopyFlags.BACKUP,

0 commit comments

Comments
 (0)