diff --git a/fastanime/Utility/downloader/downloader.py b/fastanime/Utility/downloader/downloader.py index f3613f5..3eb134a 100644 --- a/fastanime/Utility/downloader/downloader.py +++ b/fastanime/Utility/downloader/downloader.py @@ -62,6 +62,12 @@ class YtDLPDownloader: if url.endswith(".torrent"): WEBTORRENT_CLI = shutil.which("webtorrent") if not WEBTORRENT_CLI: + import time + + print( + "webtorrent cli is not installed which is required for downloading and streaming from nyaa\nplease install it or use another provider" + ) + time.sleep(120) return cmd = [ WEBTORRENT_CLI, diff --git a/fastanime/cli/utils/mpv.py b/fastanime/cli/utils/mpv.py index cec02e6..7a872cc 100644 --- a/fastanime/cli/utils/mpv.py +++ b/fastanime/cli/utils/mpv.py @@ -64,7 +64,16 @@ def run_mpv( youtube_regex = r"(https?://)?(www\.)?(youtube|youtu|youtube-nocookie)\.(com|be)/.+" if link.endswith(".torrent"): - cmd = ["webtorrent", link, f"--{player}"] + WEBTORRENT_CLI = shutil.which("webtorrent") + if not WEBTORRENT_CLI: + import time + + print( + "webtorrent cli is not installed which is required for downloading and streaming from nyaa\nplease install it or use another provider" + ) + time.sleep(120) + return "0", "0" + cmd = [WEBTORRENT_CLI, link, f"--{player}"] subprocess.run(cmd) return "0", "0" if player == "vlc":