mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Skip ytdl flag on macOS ARM
Fixes sounds failing to play in the packaged build on macOS.
This commit is contained in:
parent
1157465844
commit
d3d6bd8ce0
1 changed files with 5 additions and 2 deletions
|
@ -30,6 +30,7 @@ from __future__ import annotations
|
|||
import inspect
|
||||
import json
|
||||
import os
|
||||
import platform
|
||||
import select
|
||||
import socket
|
||||
import subprocess
|
||||
|
@ -40,7 +41,7 @@ import time
|
|||
from queue import Empty, Full, Queue
|
||||
from shutil import which
|
||||
|
||||
from anki.utils import is_win
|
||||
from anki.utils import is_mac, is_win
|
||||
|
||||
|
||||
class MPVError(Exception):
|
||||
|
@ -88,11 +89,13 @@ class MPVBase:
|
|||
"--keep-open=no",
|
||||
"--autoload-files=no",
|
||||
"--gapless-audio=no",
|
||||
"--no-ytdl",
|
||||
]
|
||||
|
||||
if is_win:
|
||||
default_argv += ["--af-add=lavfi=[apad=pad_dur=0.150]"]
|
||||
if not is_mac or platform.machine() != "arm64":
|
||||
# our arm64 mpv build doesn't support this option (compiled out)
|
||||
default_argv += ["--no-ytdl"]
|
||||
|
||||
def __init__(self, window_id=None, debug=False):
|
||||
self.window_id = window_id
|
||||
|
|
Loading…
Reference in a new issue