Update bitanime.py

This commit is contained in:
Arctic4161 2021-10-14 16:23:28 -05:00 committed by GitHub
parent 1ecec7c05d
commit 9d4dc53961
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,8 +109,14 @@ def bitanime():
except ValueError:
print(f"{ERR}Invalid input. Please try again.")
episode_start = episode_start if episode_start is not None else 1
episode_end = episode_end if episode_end is not None else all_episodes
if episode_start is not None:
pass
else:
episode_start = 1
if episode_end is not None:
pass
else:
episode_end = all_episodes
download = Download(
name, episode_quality, folder, all_episodes, episode_start, episode_end
@ -125,17 +131,17 @@ def bitanime():
source = None
episode_links = download.get_links(source)
with concurrent.futures.ThreadPoolExecutor() as executing:
download_links = list(executing.map(download.get_download_links, episode_links))
download_urls = list(executing.map(download.get_download_urls, download_links))
print(f"{OK}Downloading {Fore.LIGHTCYAN_EX}{len(download_urls)}{Fore.RESET} episode/s")
with concurrent.futures.ThreadPoolExecutor() as executor:
download_links = list(executor.map(download.get_download_links, episode_links))
download_urls = list(executor.map(download.get_download_urls, download_links))
print(
f"{OK}Downloading {Fore.LIGHTCYAN_EX}{len(download_urls)}{Fore.RESET} episode/s"
)
thread_map(
download.download_episodes,
download_urls,
ncols=75,
total=len(download_urls),
total=len(download_urls)
)
try: