-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
Comments
Try |
`PS D:\tg_down> tdl -n quickstart dl -f 1526240073.json -t 8 -s 524288 -l 4 --skip-same --continue -i mp4,flv,f4v,webm,m4v,mov,3gp,3g2,rm,rmvb,mpg,mpeg,mpe,ts,mpg,mpeg,mpe,ts,vob,dat,mkv,lavf,cpk,dirac,ram,qt,fli,flc,mod --template '{{ replace .FileName "\n" "_" }}'
The above error occurred after using the template you provided |
But I use "-f "Media.Name not contains '\n' " " to filter out all conversations that contain"\n ", which works fine. I don't know if that helps solve the problem. |
PS D:\tg_down> tdl -n quickstart dl -f 1877648258.json -t 8 -s 524288 -l 4 --skip-same --continue -i mp4,flv,f4v,webm,m4v,mov,3gp,3g2,rm,rmvb,mpg,mpeg,mpe,ts,mpg,mpeg,mpe,ts,vob,dat,mkv,lavf,cpk,dirac,ram,qt,fli,flc,mod --template "{{ replace .FileName '\n' '' '/' '' ':' '' '*' '' '?' '' '<' '' '>' '' '|' '' ' ' '_' }}"
PS D:\tg_down> tdl -n quickstart dl -f 1877648258.json -t 8 -s 524288 -l 4 --skip-same --continue -i mp4,flv,f4v,webm,m4v,mov,3gp,3g2,rm,rmvb,mpg,mpeg,mpe,ts,mpg,mpeg,mpe,ts,vob,dat,mkv,lavf,cpk,dirac,ram,qt,fli,flc,mod --template "{{ replace .FileName '' '' '/' '' ':' '' '*' '' '?' '' '<' '' '>' '' '|' '' ' ' '_' }}"
|
I noticed that the template uses the inverted single quote "`" instead of the single quote "'" and the double quote " " ” |
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
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
The text was updated successfully, but these errors were encountered: