diff --git a/fastanime/cli/utils/mpv.py b/fastanime/cli/utils/mpv.py index 6c037a8..18a1dc1 100644 --- a/fastanime/cli/utils/mpv.py +++ b/fastanime/cli/utils/mpv.py @@ -5,6 +5,19 @@ import subprocess def mpv(link, title, *custom_args): MPV = shutil.which("mpv") if not MPV: - print("mpv not found") - return - subprocess.run([MPV, *custom_args, f"--title={title}", link]) + args = [ + "nohup", + "am", + "start", + "--user", + "0", + "-a", + "android.intent.action.VIEW", + "-d", + link, + "-n", + "is.xyz.mpv/.MPVActivity", + ] + subprocess.run(args) + else: + subprocess.run([MPV, *custom_args, f"--title={title}", link])