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

when calling "get command" menu item, spaces in output filename template break template argument #173

Closed
5 of 9 tasks
tolik89u opened this issue May 31, 2017 · 1 comment
Labels
Milestone

Comments

@tolik89u
Copy link

tolik89u commented May 31, 2017

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

WARNING

All the invalid issues will be rejected!!


Before going further

  • If your problem is a bug with the youtube-dl program or a request for new site support please report it here

  • Make sure you are using the latest youtube-dl-gui version: Options > About tab. If it's not please download & install the latest version for your OS and check if your issue still persists

  • Make sure you are using the latest youtube-dl version: Click the Update button on the main screen and check if your issue still persists

  • Make sure you searched the bugtracker for similar issues including closed ones

    • I assure that my problem is NOT with youtube-dl
    • I've verified and I assure that I'm running youtube-dl-gui 0.3.8
    • I assure that i am using the latest version of youtube-dl
    • Searched bugtracker

What is the purpose of your issue?

  • Bug during the download process (encountered problems after hitting the Download button)
  • Bug other (encountered other problems with youtube-dl-gui)
  • Feature request (request for a new functionality)
  • Question
  • Other

Please remove the following section between the (---) if your problem does not belong to the first two categories (bug report)

What operating system do you use ?

Windows 10 x64 russian locale

List of actions to perform to reproduce the problem:

  1. in settings, set output filename template so that it contains spaces, e. g.
    %(upload_date)s\%(id)s_%(playlist_id)s - %(format)s.%(ext)s
  2. add some downloads to the downloads list
  3. press right mouse button on one and click "get command" menu item

What is the expected behaviour ?

output filename template command line argument is correctly escaped so that spaces in template do not split it into multiple separate (invalid) arguments, so that youtube-dl could correctly run that command, e. g.
youtube-dl.exe -o "%(upload_date)s\%(id)s_%(playlist_id)s - %(format)s.%(ext)s"

What happens instead ?

spaces are not escaped and since in windows command line commands space is an arguments separator, therefore not properly escaped spaces split template argument on multiple args and break the command, so that youtube-dl already cannot rut in correctly, e. g. youtube-dl.exe -o %(upload_date)s\%(id)s_%(playlist_id)s - %(format)s.%(ext)s


Description of your issue, suggested solution and other information. Please make sure the description is worded well enough to be understood.

I suggest at least to wrap the output filename template in double quotes as I showed that above, as the easiest (but maybe not the best) solution.

@tolik89u tolik89u changed the title when calling "get command" menu item, not properly escaped spaces in output filename template break (split) template argument onto multiple command line args when calling "get command" menu item, spaces in output filename template break template argument May 31, 2017
@MrS0m30n3 MrS0m30n3 added the bug label Jun 7, 2017
@MrS0m30n3 MrS0m30n3 added this to the New UI merge milestone Jun 7, 2017
MrS0m30n3 added a commit that referenced this issue Jun 14, 2017
@MrS0m30n3
Copy link
Owner

Hi, @tolik89u

I just uploaded a patched portable version, you can get it from here. I used double quotes (not the best solution) to get around spaces since '\' and '^' did not work on Windows.

If the issue still persists let me know else you should close this issue, thanks for the report.

MrS0m30n3 added a commit that referenced this issue Jun 18, 2017
Wrap the option with double quotes if it contains
any special characters (spaces, parentheses, etc..) instead
of wrapping it only when it contains spaces.

This patch fixes the issue with the parentheses inside
the youtube-dl output template when running Youtube-dlg
on Linux.

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

No branches or pull requests

2 participants