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

Unable to rename file #272

Closed
ostal opened this issue Jan 12, 2012 · 4 comments
Closed

Unable to rename file #272

ostal opened this issue Jan 12, 2012 · 4 comments

Comments

@ostal
Copy link

@ostal ostal commented Jan 12, 2012

Hi there,

I got his error today

C:\Users\Zajac\Downloads>youtube-dl.py -c -w -f 34 --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" -a aa.txt
[youtube] Setting language
[youtube] u_x0e-JOhdU: Downloading video webpage
[youtube] u_x0e-JOhdU: Downloading video info webpage
[youtube] u_x0e-JOhdU: Extracting video information
[download] Destination: Heaven :Bryan Adams.flv
[download] 100.0% of 11.75M at 72.92k/s ETA 00:00
ERROR: unable to rename file

C:\Users\Zajac\Downloads>

the file that i found in the youtube-dl directory was "Heaven".

@phihag
Copy link
Contributor

@phihag phihag commented Jan 12, 2012

When you include %(title)s in the file template, you advise youtube-dl to use the literal title, without changing any characters. You are looking for %(stitle)s, which replaces colons with an underscore.

Where did you find %(title)s ? The output of youtube-dl --help doesn't even mention it since it's pretty obscure.

I think we should rename %(title)s to %(literal_title)s. The literal title could be useful if you're executing youtube-dl on top of a virtual filesystem, but that's a pretty esoteric use case.

@phihag phihag closed this Jan 12, 2012
@ostal
Copy link
Author

@ostal ostal commented Jan 12, 2012

Hi,

Thanks for the prompt reply!

I have found the %(title)s in the documentation :
http://rg3.github.com/youtube-dl/documentation.html
under Output template

when i replaced the title with lireral_title i got the fallowing error

C:\Users\Zajac\Downloads>youtube-dl.py -c -w -f 34 --extract-audio --audio-format mp3 -o "%(literal_title)s.%(ext)s" -a aa.txt
[youtube] Setting language
[youtube] u_x0e-JOhdU: Downloading video webpage
[youtube] u_x0e-JOhdU: Downloading video info webpage
[youtube] u_x0e-JOhdU: Extracting video information
ERROR: invalid system charset or erroneous output template

while %(stitle)s works fine.

Thanks!

@phihag
Copy link
Contributor

@phihag phihag commented Jan 12, 2012

Oops, the documentation should have never mentioned %(title)s. Fixed it.

%(literal_title)s doesn't exist yet, I just suggested that we rename the current %(title)s to that.

@5moufl
Copy link
Contributor

@5moufl 5moufl commented Aug 25, 2012

What to use so it does not replace spaces with underscores (which I find ugly as hell). I currently use %(title)s

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.