abdulrahman1s / fem-dl

Frontend Masters Course Downloader That actually works.
https://npmjs.com/package/fem-dl
The Unlicense
164 stars 28 forks source link

Feat: Allow user to select lessons #19

Closed msa-ali closed 4 months ago

msa-ali commented 1 year ago

The script currently allows us to download the entire course. However, there may be times when the download fails due to a network issue or rate limiting. In this case, we may not want to download the lessons that have already been downloaded. Instead, we can select the lessons that were not downloaded or were only partially downloaded.

I have added a feature to ask the user if they want to download specific lessons. If so, the script will prompt the user with a list of all the lessons (not episodes) so that they can select the ones they want to download.

abdulrahman1s commented 1 year ago

Hello Muhammad,

Firstly, I want to express my gratitude for your valuable contribution. Your efforts are truly appreciated.

I noticed that the 'enquirer' library is being used in the code. We already have the 'prompts' library installed, which offers similar functionality. Would you consider taking a look at this example from the 'prompts' documentation?

If you could adjust the code to utilize 'prompts' instead, it would be fantastic.

Thank you once again for your dedication and hard work!

msa-ali commented 1 year ago

Hey Abdul Rahman, Thank you for reviewing the code. I have removed enquirer and reused prompts. My bad during implementation, I was looking into prompt documentation instead of prompts and couldn't find support for multi-select. Also, I have done some code refactoring and moved all prompts to prompt.js utility.

Btw, I see one issue with prompts multi-select as all options are not visible in the console. Please let me know if I have missed something. Thank you :)