summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mpv.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mpv.py b/mpv.py
index 2b2f73b..fd77a35 100644
--- a/mpv.py
+++ b/mpv.py
@@ -28,7 +28,10 @@ import re
import traceback
if os.name == 'nt':
- backend = CDLL('mpv-1.dll')
+ try:
+ backend = CDLL('mpv-1.dll')
+ except FileNotFoundError:
+ backend = CDLL(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'mpv-1.dll'))
fs_enc = 'utf-8'
else:
import locale