]> git.sesse.net Git - vlc/blobdiff - bindings/python-ctypes/override.py
python-ctypes: try to detect plugin path on win32 / macosx
[vlc] / bindings / python-ctypes / override.py
index 729f5002cbd93458f2d3f5a7e371cf6173317c92..1a3968463d3ae140c5dcb5b065eddc8496eec24b 100644 (file)
@@ -24,6 +24,10 @@ class Instance:
         if p and isinstance(p[0], MediaControl):
             return p[0].get_instance()
         else:
+            if not p and detected_plugin_path is not None:
+                # No parameters passed. Under win32 and MacOS, specify
+                # the detected_plugin_path if present.
+                p=[ 'vlc', '--plugin-path='+ detected_plugin_path ]
             e=VLCException()
             return libvlc_new(len(p), p, e)
 
@@ -74,6 +78,10 @@ class MediaControl:
             e=MediaControlException()
             return mediacontrol_new_from_instance(p[0], e)
         else:
+            if not p and detected_plugin_path is not None:
+                # No parameters passed. Under win32 and MacOS, specify
+                # the detected_plugin_path if present.
+                p=[ 'vlc', '--plugin-path='+ detected_plugin_path ]
             e=MediaControlException()
             return mediacontrol_new(len(p), p, e)