Prudhvi-pln / udb

Introducing UDB: Your One-Stop Solution for Effortless Anime, Drama, Movies, TV Shows Downloads. UDB is a powerful and user-friendly download utility specifically designed for anime, drama, tv-series enthusiasts. It empowers you to effortlessly download entire series at once, saving you precious time and frustration.
MIT License
16 stars 11 forks source link

Loop enhancements for udb.py #17

Closed ZetsApocNow closed 3 months ago

ZetsApocNow commented 3 months ago

First time doing a pull request! I've made some improvements to the main script for ease of use and a couple of closure reductions on errors. I'm sure the same can be done for the other stages, but this is all I have for now.

If you wrap the entire code below all the imports in a loop, then after a download is completed, it goes back to the main selection and you can keep going without it closing down.

image

image

Results in

image

Further enhancements could also be made to the other user prompts, for example, if you accidentally enter a letter instead of a number, or a number out of range, such as

image

instead of exiting the code, it could just re-prompt until it gets an acceptable answer, instead of erroring out and closing

Changing the code here

image

Results in

image

and this fixes the exiting on the series/film selection

image

image

Prudhvi-pln commented 3 months ago

Thanks for your contribution. But wrapping the entire code in a while block increases the indentation and it is easy to mess up 😅. Instead I considered your feedback and implemented them. Please use the latest version >= 2.12.3, and let me know if you face any issues.

ZetsApocNow commented 3 months ago

ok, whatever works, tried the new version, works great