From d9053e9c5fa2cd9ce1d0bcda17a45570b570a77c Mon Sep 17 00:00:00 2001 From: Benex254 Date: Mon, 5 Aug 2024 09:47:05 +0300 Subject: [PATCH] feat(mpv): use the executable path instead of string --- fastanime/cli/utils/mpv.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fastanime/cli/utils/mpv.py b/fastanime/cli/utils/mpv.py index eb02b46..ff1e7cb 100644 --- a/fastanime/cli/utils/mpv.py +++ b/fastanime/cli/utils/mpv.py @@ -26,9 +26,9 @@ from typing import Optional # -def stream_video(url, mpv_args, custom_args): +def stream_video(MPV, url, mpv_args, custom_args): process = subprocess.Popen( - ["mpv", url, *mpv_args, *custom_args], + [MPV, url, *mpv_args, *custom_args], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, @@ -127,7 +127,7 @@ def mpv( mpv_args.append(f"--title={title}") if ytdl_format: mpv_args.append(f"--ytdl-format={ytdl_format}") - stop_time, total_time = stream_video(link, mpv_args, custom_args) + stop_time, total_time = stream_video(MPV, link, mpv_args, custom_args) return stop_time, total_time