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

Add option to replace download progress overwrite (\r) with newline (\n) #254

Closed
spidey opened this issue Dec 17, 2011 · 2 comments
Closed

Add option to replace download progress overwrite (\r) with newline (\n) #254

spidey opened this issue Dec 17, 2011 · 2 comments

Comments

@spidey
Copy link

@spidey spidey commented Dec 17, 2011

I want to use youtube-dl to download some video with a GUI. I've hoped that I could use the progress reported by youtube-dl to show a graphical progress bar in my GUI.
The problem is that parsing individual bytes is much harder than parsing lines of text. This is why I'd like a switch on youtube-dl to use \n instead of \r when reporting the downloaded status of the video so far.

@phihag
Copy link
Contributor

@phihag phihag commented Dec 19, 2011

Well, if you split by \r instead of \n (or just replace \r with \n), you should already get what you want without any modification. By the way, we're planning on offering a "real" API (see #152) that would be ideal for the use case of a GUI.

Therefore, I don't think an additional option is necessary; as the GUI can just replace \n with \r (if you need any help with that, please post a link to GUI's source code repository).

@phihag phihag closed this Dec 19, 2011
@spidey
Copy link
Author

@spidey spidey commented Dec 20, 2011

That was what I did. I'm using Qt, so I made an intermediary "buffer" to process \r into \n. But thinking about command line usage, "tr" may do the trick.

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
2 participants
You can’t perform that action at this time.