linuxmint / linuxmint/cinnamon-spices-applets
Radio++ (radio@driglu4it): download-from-YouTube command breaks on titles ending in a backslash
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 758
- Forks
- 729
- Avg merge
- 9h 47m
- Merged PRs (30d)
- 19
Description
In src/services/youtubeDownload/YtDlp.ts / YoutubeDl.ts, the download command escapes " in the track title (title.replaceAll('"','\\"')) but not \. A title ending in an odd number of backslashes causes the appended closing quote to be escaped away instead of closing the string, and the command fails to parse (g-shell-error-quark: Text ended before matching quote was found).
Suggested fix: escape backslashes before quotes, or better, build the command via an argv array instead of a shell string entirely (see the related issue about this same command-builder's shell-injection risk).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/services/youtubeDownload/YtDlp.ts and YoutubeDl.ts, then trace how the download command is assembled. Reproduce the failure with a track title ending in an odd number of backslashes and inspect the existing quote escaping. Done means the command parses and downloads successfully for such titles without weakening the related shell-safety concerns.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 76/100