Gaarv / kadenze-dl

Small application to download Kadenze (https://www.kadenze.com) videos for courses you enrolled in
MIT License
50 stars 16 forks source link

correct video name #2

Closed ruiguo-bio closed 6 years ago

ruiguo-bio commented 7 years ago

Thank for you good job! I find the video name is directly got from the download file name e.g. 3.1_2_720.mp4, and it's better replaced by the meaningful name in the media queue.

Also I hope when downloading, it will show the percentage bar of each downloading file. If one file is not downloaded successfully, it should not be saved so the next time it can be downloaded again, not just skipped. Many of my downloaded file is not completed, due to my poor network :(

Gaarv commented 7 years ago

Getting the proper video filename might be tricky, since it's not in the json containing video information, but I will give it a try.

On the other side, I also wanted to have a progress bar so it has been added :) Parallelized download has been disabled for now, working on how to sync the progress bar between downloads in the console.

ruiguo-bio commented 7 years ago

Thank you. I think coursera-dl may have all the behavior I suggested. If possible, you can take a look on their code :)

ruiguo-bio commented 7 years ago

The progress bar is ok at the beginning of running, but after sometime it keeps output on new lines, like the picture below: screen shot 2016-12-07 at 16 16 30

The file names when the issue happens is like 2.11_1720, a "" suffix. Is that the problem?

Gaarv commented 7 years ago

I will take a look at this, I might switch to the tqdm library since its so well done. Thanks for reporting !

ruiguo-bio commented 7 years ago

Another interesting issue is when I download one machine learning for musicians course, it split the 8 introduction section videos into 8 folders, like the picture below: 1

Those videos are all in the first section, so they should be in the 1-introduction folder

Gaarv commented 7 years ago

Progress bar issue should be fixed. It seems to be the buffering behaving differently on OSX, I use print(s, flush=True) now instead of sys.stdout.flush() so that should take care of it.

The naming issue is due to this course not following naming convention used on other courses videos (first number in the filename should be session number) but found a workaround, and I downloaded the introduction at only one place :)

Still need more time for implementing proper video names as I don't want anyone to redownload all video so will need to figure also a way to rename them.

nazikus commented 6 years ago

any progress on naming files? maybe you could make in optional through configuration? really inconvenient to browse through cryptic files names when downloaded.

Gaarv commented 6 years ago

Honestly, I haven't looked hard into it, apologies :) The optional parameter is a great idea, as the default download would still be usable if getting names failed.

I will get some testing done this week and let you know.

Gaarv commented 6 years ago

Seems like Kadenze included the video title in the json data since last time I checked, and I've got good results getting them.

I will be doing more checks on differents courses by downloading them multiple times and will be pushing the changes later this week if all ok.

Gaarv commented 6 years ago

Videos will now be named by their respective videos titles (activated by default in configuration) when possible. It should always be the case tho, haven't encountered any issue so far on several courses.

Also a new dependency needs to be installed, by running "pip install -r requirements.txt" on a refreshed clone repository.

Let me know if any issue :)

nazikus commented 6 years ago

works great. thanks for prompt response.