change profile using command palette

This commit is contained in:
stax76
2022-05-22 08:07:48 +02:00
parent 27f7935127
commit 5b57e6214e
5 changed files with 37 additions and 19 deletions

View File

@@ -1516,5 +1516,24 @@ namespace mpvnet
track.Text += " " + value + ",";
}
}
private string[] _ProfileNames;
public string[] ProfileNames
{
get
{
if (_ProfileNames == null)
{
string[] ignore = { "builtin-pseudo-gui", "encoding", "libmpv", "pseudo-gui", "default" };
string profileList = Core.GetPropertyString("profile-list");
var json = profileList.FromJson<List<Dictionary<string, object>>>();
_ProfileNames = json.Select(i => i["name"].ToString())
.Where(i => !ignore.Contains(i)).ToArray();
}
return _ProfileNames;
}
}
}
}