Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command_vars dont work correctly with spaces in filename #41

Open
saalaus opened this issue Apr 9, 2024 · 1 comment
Open

Command_vars dont work correctly with spaces in filename #41

saalaus opened this issue Apr 9, 2024 · 1 comment

Comments

@saalaus
Copy link
Contributor

saalaus commented Apr 9, 2024

The script does not escape file paths with quotes, so it does not work properly if there are problems in the file path

cm = menus.ContextMenu("Converter", type=".mp4")
cm.add_items(
    [menus.ContextCommand("to mp3", "C:/ProgramData/chocolatey/bin/ffmpeg.exe -i ? test.mp3", command_vars=['FILENAME'])]
)
cm.compile()

For file path: "C:\Users\saala\Videos\Base Profile\test123.mp4"

Execute script: C:/ProgramData/chocolatey/bin/ffmpeg.exe -i C:\Users\saala\Videos\Base Profile\test123.mp4 test.mp3
^ this dont work correctly

@fhabermacher
Copy link

Same issue here. Did you find any fix to this? I contemplate a workaround by changing the executed command in a way for it to first merge the split file-subnames into the correct filename, but that is an annoying way.
(I'm running py 11 @ win 11)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants