diff --git a/app/tools/mpv.py b/app/tools/mpv.py index 6fc6eebc..2e037f89 100644 --- a/app/tools/mpv.py +++ b/app/tools/mpv.py @@ -29,12 +29,13 @@ from functools import partial, wraps from warnings import warn if os.name == 'nt': - dll = ctypes.util.find_library('mpv-1.dll') + dll = ctypes.util.find_library('libmpv-2.dll') or ctypes.util.find_library('mpv-1.dll') if dll is None: - raise OSError('Cannot find mpv-1.dll in your system %PATH%. One way to deal with this is to ship mpv-1.dll ' - 'with your script and put the directory your script is in into %PATH% before "import mpv": ' - 'os.environ["PATH"] = os.path.dirname(__file__) + os.pathsep + os.environ["PATH"] ' - 'If mpv-1.dll is located elsewhere, you can add that path to os.environ["PATH"].') + raise OSError( + 'Cannot find [lib]mpv-*.dll in your system %PATH%. One way to deal with this is to ship [lib]mpv-*.dll ' + 'with your script and put the directory your script is in into %PATH% before "import mpv": ' + 'os.environ["PATH"] = os.path.dirname(__file__) + os.pathsep + os.environ["PATH"] ' + 'If mpv-1.dll is located elsewhere, you can add that path to os.environ["PATH"].') backend = CDLL(dll) fs_enc = 'utf-8' else: