Allows you to download subtitles from Netflix
< Feedback op Netflix - subtitle downloader
Promise.race
waits for the first thing to finish. resultPromise
is the actual subtitle download. progress.stop
finishes when you click on the progress bar - that way you can stop the download. And finally asyncSleep(30, STOP_THE_DOWNLOAD)
acts as a timeout - it finishes after 30 seconds. Changing the timeout from 30 to 5 seconds has absolutely no impact on the download speed. It will only make it worse for people with extremely slow internet connection because the download will fail if it takes longer than 5 seconds.
Thanks for the script, it's great.
But I have a question - what is this line for:
result = await Promise.race([resultPromise, progress.stop, asyncSleep(30, STOP_THE_DOWNLOAD)]);
It slows down the download process terribly, especially for series.
Couldn't it be 5 seconds, for example? – I checked and it works.