Open Hyumiris opened 1 year ago
In case this helps narrowing causes down, here are the same tests for 1.51.x
In 1.5.x this was already wrong but behaved differently:
Neither variant of videodownload created anything (folder of file)
In 1.51.1, while still returning status code 0 it at least showed an error message <cwd>/folder/vid.mp4: No such file or directory
. (no quotation marks in either variant)
chatdownload would fail both variants in both versions (status code 134).
The error message is System.IO.DirectoryNotFoundException: Could not find a part of the path '<cwd>/folder2/ch"a"t.json'
(note that the quotation marks are correctly present at least)
i cut the testing for chatrender short as these older versions do not seem to create any new folders ever. But for either version if the target folder exists you get the file without quotation marks
I'm surprised only chatrender threw an exception since Ffmpeg has dodgy behaviour with double quotes in the file path on Linux and double quotes are a banned character on Windows.
Checklist
Edition
Command Line Interface
Describe your issue here
Having (properly escaped) quotation marks in the input/output path causes both inconsistent and unintuitive behaviour.
For the cases below i made sure that the input always exists and the output does not (neither file nor directories)
Case 1.1: video download with quotation marks in folder path
TwitchDownloaderCLI videodownload -u 1750281117 -o fol\"d\"er/vid.mp4
Case 1.2: video download with quotation marks in file name
TwitchDownloaderCLI videodownload -u 1750281117 -o folder/v\"i\"d.mp4
Case 2.1: chat download with quotation marks in folder path
TwitchDownloaderCLI chatdownload -u 1750281117 -o fol\"d\"er2/chat.json
Case 2.2: chat download with quotation marks in file name
TwitchDownloaderCLI chatdownload -u 1750281117 -o folder2/ch\"a\"t.json
Case 3.1: chat render with quotation marks in input
Case 3.2: chat render with quotation marks in output folder
TwitchDownloaderCLI chatrender -i folder2/ch\"a\"t.json -o fol\"d\"er3/chat.mp4
Case 3.3: chat render with quotation marks in output file name
TwitchDownloaderCLI chatrender -i folder2/ch\"a\"t.json -o folder4/ch\"a\"t.mp4
In summary: chatdownload works flawlessly, the other two commands either incorrectly remove the quotation marks or fail outright (silently or not).
How it should be: The cli should assume that the paths that are given as inputs are correct as they are (no further parsing) and only fail, if they are invalid (rejected by the file system).