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

Cant get concrete filename after download #12456

Closed
C0DK opened this issue Mar 15, 2017 · 2 comments
Closed

Cant get concrete filename after download #12456

C0DK opened this issue Mar 15, 2017 · 2 comments

Comments

@C0DK
Copy link

C0DK commented Mar 15, 2017

I am trying to download songs from youtube, via the embedded system, and then after it is converted to MP3, have it added to my MPD server's queue. however i cannot seem to find the filename after the file has been converted. i hoped i could use a hook upon finishing, however "finish" is when the download is finished - not when the conversion is finished. I hoped that i could get the finished filename from the "extract_info" method, however it only returns the title name - the outtmpl removes certain characters from the filename ("(",")" as an example) which makes it quite hard to figure out what the finished songname will be. Is it possible to get this filename upon conversion?

Thank you!

@johnhawkinson
Copy link
Contributor

johnhawkinson commented Mar 15, 2017

Are you saying that --exec "add-to-queue.sh {}" does not work?

Sorry, when you say "embedded system" you mean the Python API, and so you're talking about the finished status of a progress_hook? So I think you should look at adding a postprocessor as --exec does.

@dstftw
Copy link
Collaborator

dstftw commented Mar 15, 2017

You can't get exact filename after conversion, but you can provide unique name via outtmpl yourself, like uuid.%(ext)s. Assuming the final extension is mp3 it's easy to build final filename. ( and ) are not sanitized until you explicitly require to do so. Refs #5710, #10987.

@dstftw dstftw closed this as completed Mar 15, 2017
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

3 participants