support added for --list-properties
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
TODO: fix volume/mute being initialized muted
|
||||
|
||||
###
|
||||
|
||||
- the [scripting wiki page](https://github.com/stax76/mpv.net/wiki/Scripting#powershell) was improved
|
||||
|
||||
@@ -606,9 +606,12 @@ namespace mpvnet
|
||||
}
|
||||
else if (!preInit && !preInitProperties.Contains(left))
|
||||
{
|
||||
mp.ProcessProperty(left, right);
|
||||
if (!App.ProcessProperty(left, right))
|
||||
set_property_string(left, right, true);
|
||||
if (!PrintCommandLineArgument(arg))
|
||||
{
|
||||
mp.ProcessProperty(left, right);
|
||||
if (!App.ProcessProperty(left, right))
|
||||
set_property_string(left, right, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -642,6 +645,20 @@ namespace mpvnet
|
||||
}
|
||||
}
|
||||
|
||||
static bool PrintCommandLineArgument(string argument)
|
||||
{
|
||||
switch (argument)
|
||||
{
|
||||
case "--list-properties=yes":
|
||||
var list = get_property_string("property-list").Split(',').ToList();
|
||||
list.Sort();
|
||||
Console.WriteLine(string.Join("\r\n", list.ToArray()));
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static DateTime LastLoad;
|
||||
|
||||
public static void Load(string[] files, bool loadFolder, bool append)
|
||||
|
||||
Reference in New Issue
Block a user