support for autocreate-playlist, video-exts, audio-exts, image-exts

This commit is contained in:
stax76
2024-10-12 21:50:46 +02:00
parent cca474a5a5
commit 59a556794f
7 changed files with 85 additions and 44 deletions

View File

@@ -346,6 +346,9 @@ public class MpvClient
public string GetPropertyString(string name)
{
if (Handle == IntPtr.Zero)
return "";
mpv_error err = mpv_get_property(Handle, GetUtf8Bytes(name),
mpv_format.MPV_FORMAT_STRING, out IntPtr lpBuffer);
@@ -364,6 +367,12 @@ public class MpvClient
public void SetPropertyString(string name, string value)
{
if (Handle == IntPtr.Zero)
{
Terminal.WriteError($"error setting property: {name} = {value}");
return;
}
byte[] bytes = GetUtf8Bytes(value);
mpv_error err = mpv_set_property(Handle, GetUtf8Bytes(name), mpv_format.MPV_FORMAT_STRING, ref bytes);