-
Notifications
You must be signed in to change notification settings - Fork 64
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
Display Download Progress of Individual Tracks #57
base: master
Are you sure you want to change the base?
Conversation
Very nice! Could you make it so that this is only activated |
Download progress will not be included when output is redirected/piped.
This looks great! Thank you! Would it be possible to remove each progress indicator once it reaches 100%? It's not needed at that point, after all, and is just bloating the list, doubling its length. |
It is possible to remove the progress once it reaches 100% and I think it would be ideal to do so, but I've run into an issue of compatibility across environments. The simplest method would leave the last progress message on the screen, which could be overwritten with whitespace (or other text). Potential side effects would be an extra line of whitespace at the bottom of terminal output. There is also the possibility that any print statement after the last progress message will have some extra whitespace added to it. Then, the next solution might be to use ASCII control codes, and this works well, except they don't work properly out of the box when using Windows cmd. So, if using ASCII control codes, we could
I like the cleanliness of the last option. It's just a few lines to enable, but it does introduce OS-specific code. Eg
@obskyr Thoughts? |
@vtdiep I'm thinking I eventually want to redo this – unless you'd like to – to put the progress indicator on the same line as the "Downloading [x]..." line – that way, |
Are you thinking "Downloading x/y (z%): track-name" ? |
@obskyr I don't mind working on putting the progress indicator on the same line; its great to be able to contribute! I was wondering though, on how you would approach it. For lack of a better word, I've been trying to keep changes minimally invasive, but if you're open to slightly bigger changes, then the more options there are. I was tinkering and maybe yielding the progress to the calling function so that downloading X and progress could be printed on the same line could work. I don't know if you like the idea of yielding the progress though, lol Anyways, let me know what you think. If you think this approach is a good base to work off, then yeah, I'd be happy to continue to work on it. Or if you want to go in a different direction or maybe take care of it with any other changes you're planning, that's good as well. Currently, the format is "Downloading x/y: track-name (z%)" but switching the ordering and placement would be a quick change. |
@obskyr ^ |
Friendly ping, @obskyr. |
As stated and shown below:
Partially addresses #56
It can be reassuring (or frustrating) to see progress when dealing with large file sizes and/or slow connections.