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

[Bug] File name contains \n cannot be filtered during download #612

Closed
PAINCLOWN opened this issue May 9, 2024 · 1 comment
Closed

[Bug] File name contains \n cannot be filtered during download #612

PAINCLOWN opened this issue May 9, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@PAINCLOWN
Copy link

Describe the bug

File name contains \n cannot be filtered during download,
--template "{{ replace .FileName \\n _ / _ \ _ : _ * _ ? _ < _ > _ | _ _ }}"
or
--template "{{ replace .FileName \n _ / _ \ _ : _ * _ ? _ < _ > _ | _ _ }}"
When I download using cmd, it causes the file name to contain a newline and the file cannot be created

image

image
image

To Reproduce

--template "{{ replace .FileName \\n _ / _ \ _ : _ * _ ? _ < _ > _ | _ _ }}"
or
--template "{{ replace .FileName \n _ / _ \ _ : _ * _ ? _ < _ > _ | _ _ }}"

Expected behavior

Unable to filter \n

Version

Version: 0.17.0
Commit: 95120c0
Date: 2024-04-21T14:07:16Z

go1.21.9 windows/amd64

Which OS are you running tdl on?

Windows

Additional context

No response

@PAINCLOWN PAINCLOWN added the bug Something isn't working label May 9, 2024
@iyear
Copy link
Owner

iyear commented Jun 3, 2024

Try --template '{{ replace .FileName "\n" "_" }}'. Be careful of quotation.

@iyear iyear closed this as completed Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants