From 079f07cfd2a932f6e4ce76db99c65b63b3eb442b Mon Sep 17 00:00:00 2001 From: DYefremov Date: Thu, 9 Mar 2023 08:47:57 +0300 Subject: [PATCH] mpv module update --- app/tools/mpv.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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: