@@ -19,7 +19,7 @@ public class Chapter
|
||||
_timeDisplay = TimeSpan.FromSeconds(Time).ToString();
|
||||
|
||||
if (_timeDisplay.ContainsEx("."))
|
||||
_timeDisplay = _timeDisplay[.._timeDisplay.LastIndexOf(".")];
|
||||
_timeDisplay = _timeDisplay[.._timeDisplay.LastIndexOf('.')];
|
||||
}
|
||||
|
||||
return _timeDisplay;
|
||||
|
||||
@@ -42,7 +42,7 @@ public class Command
|
||||
{
|
||||
if (i.Contains("://") || File.Exists(i))
|
||||
{
|
||||
Player.LoadFiles(new[] { i }, true, false);
|
||||
Player.LoadFiles([i], true, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ public class CommandLine
|
||||
if (_arguments != null)
|
||||
return _arguments;
|
||||
|
||||
_arguments = new();
|
||||
_arguments = [];
|
||||
|
||||
foreach (string i in Environment.GetCommandLineArgs().Skip(1))
|
||||
{
|
||||
@@ -37,7 +37,7 @@ public class CommandLine
|
||||
arg += "=yes";
|
||||
}
|
||||
|
||||
string left = arg[2..arg.IndexOf("=")];
|
||||
string left = arg[2..arg.IndexOf('=')];
|
||||
string right = arg[(left.Length + 3)..];
|
||||
|
||||
if (string.IsNullOrEmpty(left))
|
||||
@@ -113,16 +113,19 @@ public class CommandLine
|
||||
|
||||
public static void ProcessCommandLineFiles()
|
||||
{
|
||||
List<string> files = new List<string>();
|
||||
List<string> files = [];
|
||||
|
||||
foreach (string arg in Environment.GetCommandLineArgs().Skip(1))
|
||||
{
|
||||
if (!arg.StartsWith("--") && (arg == "-" || arg.Contains("://") ||
|
||||
arg.Contains(":\\") || arg.StartsWith("\\\\") || arg.StartsWith(".") ||
|
||||
arg.Contains(":\\") || arg.StartsWith("\\\\") || arg.StartsWith('.') ||
|
||||
File.Exists(arg)))
|
||||
|
||||
{
|
||||
files.Add(arg);
|
||||
}
|
||||
}
|
||||
|
||||
Player.LoadFiles(files.ToArray(), !App.Queue, App.Queue);
|
||||
Player.LoadFiles([.. files], !App.Queue, App.Queue);
|
||||
|
||||
if (App.CommandLine.Contains("--shuffle"))
|
||||
{
|
||||
@@ -134,8 +137,10 @@ public class CommandLine
|
||||
public static bool Contains(string name)
|
||||
{
|
||||
foreach (StringPair pair in Arguments)
|
||||
{
|
||||
if (pair.Name == name)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -143,8 +148,10 @@ public class CommandLine
|
||||
public static string GetValue(string name)
|
||||
{
|
||||
foreach (StringPair pair in Arguments)
|
||||
{
|
||||
if (pair.Name == name)
|
||||
return pair.Value;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ public class ExtensionLoader
|
||||
{
|
||||
public event Action<Exception>? UnhandledException;
|
||||
|
||||
readonly List<object?> _refs = new();
|
||||
readonly List<object?> _refs = [];
|
||||
|
||||
void LoadDll(string path)
|
||||
{
|
||||
@@ -31,8 +31,12 @@ public class ExtensionLoader
|
||||
public void LoadFolder(string path)
|
||||
{
|
||||
if (Directory.Exists(path))
|
||||
{
|
||||
foreach (string dir in Directory.GetDirectories(path))
|
||||
{
|
||||
LoadDll(dir.AddSep() + Path.GetFileName(dir) + ".dll");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,12 +32,12 @@ public static class PathStringExtension
|
||||
int index = instance.LastIndexOf('\\');
|
||||
|
||||
if (index > -1)
|
||||
return instance.Substring(index + 1);
|
||||
return instance[(index + 1)..];
|
||||
|
||||
index = instance.LastIndexOf('/');
|
||||
|
||||
if (index > -1)
|
||||
return instance.Substring(index + 1);
|
||||
return instance[(index + 1)..];
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace MpvNet;
|
||||
|
||||
public static class FileTypes
|
||||
{
|
||||
public static string[] Subtitle { get; } = { "srt", "ass", "idx", "sub", "sup", "ttxt", "txt", "ssa", "smi", "mks" };
|
||||
public static string[] Subtitle { get; } = ["srt", "ass", "idx", "sub", "sup", "ttxt", "txt", "ssa", "smi", "mks"];
|
||||
|
||||
public static bool IsVideo(string[] exts, string ext) => exts?.Contains(ext) ?? false;
|
||||
public static bool IsAudio(string[] exts, string ext) => exts?.Contains(ext) ?? false;
|
||||
@@ -20,7 +20,7 @@ public static class FileTypes
|
||||
string exts = Player.GetPropertyString("video-exts");
|
||||
|
||||
if (string.IsNullOrEmpty(exts))
|
||||
return "mkv mp4 avi mov flv mpg webm wmv ts vob 264 265 asf avc avs dav h264 h265 hevc m2t m2ts m2v m4v mpeg mpv mts vpy y4m".Split(' ');
|
||||
return ["mkv", "mp4", "avi", "mov", "flv", "mpg", "webm", "wmv", "ts", "vob", "264", "265", "asf", "avc", "avs", "dav", "h264", "h265", "hevc", "m2t", "m2ts", "m2v", "m4v", "mpeg", "mpv", "mts", "vpy", "y4m"];
|
||||
|
||||
return exts.Split(" ,;".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
||||
}
|
||||
@@ -30,7 +30,7 @@ public static class FileTypes
|
||||
string exts = Player.GetPropertyString("audio-exts");
|
||||
|
||||
if (string.IsNullOrEmpty(exts))
|
||||
return "mp3 flac m4a mka mp2 ogg opus aac ac3 dts dtshd dtshr dtsma eac3 mpa mpc thd w64 wav".Split(' ');
|
||||
return ["mp3", "flac", "m4a", "mka", "mp2", "ogg", "opus", "aac", "ac3", "dts", "dtshd", "dtshr", "dtsma", "eac3", "mpa", "mpc", "thd", "w64", "wav"];
|
||||
|
||||
return exts.Split(" ,;".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
||||
}
|
||||
@@ -40,7 +40,7 @@ public static class FileTypes
|
||||
string exts = Player.GetPropertyString("image-exts");
|
||||
|
||||
if (string.IsNullOrEmpty(exts))
|
||||
return new string[]{ "jpg", "bmp", "png", "gif", "webp" };
|
||||
return ["jpg", "bmp", "png", "gif", "webp"];
|
||||
|
||||
return exts.Split(" ,;".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
||||
}
|
||||
|
||||
@@ -8,9 +8,7 @@ public static class StringHelp
|
||||
{
|
||||
public static string GetMD5Hash(string txt)
|
||||
{
|
||||
using MD5 md5 = MD5.Create();
|
||||
byte[] inputBuffer = Encoding.UTF8.GetBytes(txt);
|
||||
byte[] hashBuffer = md5.ComputeHash(inputBuffer);
|
||||
return BitConverter.ToString(md5.ComputeHash(inputBuffer)).Replace("-", "");
|
||||
return Convert.ToHexString(MD5.HashData(inputBuffer));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,17 +34,25 @@ public class InputConf
|
||||
var defaultBindings = InputHelp.GetDefaults();
|
||||
|
||||
foreach (Binding defaultBinding in defaultBindings)
|
||||
{
|
||||
foreach (Binding confBinding in confbindings)
|
||||
{
|
||||
if (defaultBinding.Input == confBinding.Input &&
|
||||
defaultBinding.Command != confBinding.Command)
|
||||
{
|
||||
defaultBinding.Input = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (Binding defaultBinding in defaultBindings)
|
||||
{
|
||||
foreach (Binding confBinding in confbindings)
|
||||
{
|
||||
if (defaultBinding.Command == confBinding.Command)
|
||||
defaultBinding.Input = confBinding.Input;
|
||||
}
|
||||
}
|
||||
|
||||
return (defaultBindings, confbindings);
|
||||
}
|
||||
@@ -82,16 +90,22 @@ public class InputConf
|
||||
var conf = InputHelp.Parse(Content);
|
||||
|
||||
foreach (Binding defaultBinding in defaults)
|
||||
{
|
||||
foreach (Binding confBinding in conf)
|
||||
{
|
||||
if (defaultBinding.Command == confBinding.Command &&
|
||||
defaultBinding.Comment == confBinding.Comment)
|
||||
{
|
||||
defaultBinding.Input = confBinding.Input;
|
||||
removed.Add(confBinding);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (Binding binding in removed)
|
||||
{
|
||||
conf.Remove(binding);
|
||||
}
|
||||
|
||||
defaults.AddRange(conf);
|
||||
return InputHelp.ConvertToString(defaults);
|
||||
|
||||
@@ -1,13 +1,4 @@
|
||||
|
||||
using CommunityToolkit.Mvvm.Messaging.Messages;
|
||||
|
||||
namespace MpvNet.MVVM;
|
||||
|
||||
public class MainWindowIsLoadedMessage { }
|
||||
|
||||
//public class ScaleWindowMessage : ValueChangedMessage<float>
|
||||
//{
|
||||
// public ScaleWindowMessage(float value) : base(value)
|
||||
// {
|
||||
// }
|
||||
//}
|
||||
|
||||
@@ -21,11 +21,11 @@ public class MpvClient
|
||||
public event Action? Seek; // seek MPV_EVENT_SEEK
|
||||
public event Action? PlaybackRestart; // playback-restart MPV_EVENT_PLAYBACK_RESTART
|
||||
|
||||
public Dictionary<string, List<Action>> PropChangeActions { get; set; } = new Dictionary<string, List<Action>>();
|
||||
public Dictionary<string, List<Action<int>>> IntPropChangeActions { get; set; } = new Dictionary<string, List<Action<int>>>();
|
||||
public Dictionary<string, List<Action<bool>>> BoolPropChangeActions { get; set; } = new Dictionary<string, List<Action<bool>>>();
|
||||
public Dictionary<string, List<Action<double>>> DoublePropChangeActions { get; set; } = new Dictionary<string, List<Action<double>>>();
|
||||
public Dictionary<string, List<Action<string>>> StringPropChangeActions { get; set; } = new Dictionary<string, List<Action<string>>>();
|
||||
public Dictionary<string, List<Action>> PropChangeActions { get; set; } = [];
|
||||
public Dictionary<string, List<Action<int>>> IntPropChangeActions { get; set; } = [];
|
||||
public Dictionary<string, List<Action<bool>>> BoolPropChangeActions { get; set; } = [];
|
||||
public Dictionary<string, List<Action<double>>> DoublePropChangeActions { get; set; } = [];
|
||||
public Dictionary<string, List<Action<string>>> StringPropChangeActions { get; set; } = [];
|
||||
|
||||
public nint Handle { get; set; }
|
||||
|
||||
@@ -132,46 +132,72 @@ public class MpvClient
|
||||
else if (data.format == mpv_format.MPV_FORMAT_STRING)
|
||||
{
|
||||
lock (StringPropChangeActions)
|
||||
{
|
||||
foreach (var pair in StringPropChangeActions)
|
||||
{
|
||||
if (pair.Key == data.name)
|
||||
{
|
||||
string value = ConvertFromUtf8(Marshal.PtrToStructure<IntPtr>(data.data));
|
||||
|
||||
foreach (var action in pair.Value)
|
||||
{
|
||||
action.Invoke(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (data.format == mpv_format.MPV_FORMAT_INT64)
|
||||
{
|
||||
lock (IntPropChangeActions)
|
||||
{
|
||||
foreach (var pair in IntPropChangeActions)
|
||||
{
|
||||
if (pair.Key == data.name)
|
||||
{
|
||||
int value = Marshal.PtrToStructure<int>(data.data);
|
||||
|
||||
foreach (var action in pair.Value)
|
||||
{
|
||||
action.Invoke(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (data.format == mpv_format.MPV_FORMAT_NONE)
|
||||
{
|
||||
lock (PropChangeActions)
|
||||
{
|
||||
foreach (var pair in PropChangeActions)
|
||||
{
|
||||
if (pair.Key == data.name)
|
||||
{
|
||||
foreach (var action in pair.Value)
|
||||
{
|
||||
action.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (data.format == mpv_format.MPV_FORMAT_DOUBLE)
|
||||
{
|
||||
lock (DoublePropChangeActions)
|
||||
{
|
||||
foreach (var pair in DoublePropChangeActions)
|
||||
{
|
||||
if (pair.Key == data.name)
|
||||
{
|
||||
double value = Marshal.PtrToStructure<double>(data.data);
|
||||
|
||||
foreach (var action in pair.Value)
|
||||
{
|
||||
action.Invoke(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,7 +273,9 @@ public class MpvClient
|
||||
mpv_error err = mpv_command_ret(Handle, rootPtr, resultNodePtr);
|
||||
|
||||
foreach (IntPtr ptr in pointers)
|
||||
{
|
||||
Marshal.FreeHGlobal(ptr);
|
||||
}
|
||||
|
||||
Marshal.FreeHGlobal(rootPtr);
|
||||
|
||||
@@ -409,7 +437,7 @@ public class MpvClient
|
||||
if (err < 0)
|
||||
HandleError(err, "error observing property: " + name);
|
||||
else
|
||||
IntPropChangeActions[name] = new List<Action<int>>();
|
||||
IntPropChangeActions[name] = [];
|
||||
}
|
||||
|
||||
if (IntPropChangeActions.ContainsKey(name))
|
||||
@@ -428,7 +456,7 @@ public class MpvClient
|
||||
if (err < 0)
|
||||
HandleError(err, "error observing property: " + name);
|
||||
else
|
||||
DoublePropChangeActions[name] = new List<Action<double>>();
|
||||
DoublePropChangeActions[name] = [];
|
||||
}
|
||||
|
||||
if (DoublePropChangeActions.ContainsKey(name))
|
||||
@@ -447,7 +475,7 @@ public class MpvClient
|
||||
if (err < 0)
|
||||
HandleError(err, "error observing property: " + name);
|
||||
else
|
||||
BoolPropChangeActions[name] = new List<Action<bool>>();
|
||||
BoolPropChangeActions[name] = [];
|
||||
}
|
||||
|
||||
if (BoolPropChangeActions.ContainsKey(name))
|
||||
@@ -466,7 +494,7 @@ public class MpvClient
|
||||
if (err < 0)
|
||||
HandleError(err, "error observing property: " + name);
|
||||
else
|
||||
StringPropChangeActions[name] = new List<Action<string>>();
|
||||
StringPropChangeActions[name] = [];
|
||||
}
|
||||
|
||||
if (StringPropChangeActions.ContainsKey(name))
|
||||
@@ -485,7 +513,7 @@ public class MpvClient
|
||||
if (err < 0)
|
||||
HandleError(err, "error observing property: " + name);
|
||||
else
|
||||
PropChangeActions[name] = new List<Action>();
|
||||
PropChangeActions[name] = [];
|
||||
}
|
||||
|
||||
if (PropChangeActions.ContainsKey(name))
|
||||
|
||||
@@ -1,27 +1,25 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<AssemblyName>libmpvnet</AssemblyName>
|
||||
<Product>mpv.net</Product>
|
||||
<Nullable>enable</Nullable>
|
||||
<RootNamespace>MpvNet</RootNamespace>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
</PropertyGroup>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="..\..\docs\changelog.md" Link="Docs\changelog.md" />
|
||||
<None Include="..\..\docs\manual.md" Link="Docs\manual.md" />
|
||||
<None Include="..\..\README.md" Link="Docs\README.md" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\docs\changelog.md" Link="Docs\changelog.md" />
|
||||
<None Include="..\..\docs\manual.md" Link="Docs\manual.md" />
|
||||
<None Include="..\..\README.md" Link="Docs\README.md" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Docs\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Docs\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
|
||||
<PackageReference Include="NGettext" Version="0.6.7" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CommunityToolkit.Mvvm" />
|
||||
<PackageReference Include="NGettext" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -73,10 +73,12 @@ public class MainPlayer : MpvClient
|
||||
MainHandle = mpv_create();
|
||||
Handle = MainHandle;
|
||||
|
||||
var events = Enum.GetValues(typeof(mpv_event_id)).Cast<mpv_event_id>();
|
||||
var events = Enum.GetValues<mpv_event_id>().Cast<mpv_event_id>();
|
||||
|
||||
foreach (mpv_event_id i in events)
|
||||
{
|
||||
mpv_request_event(MainHandle, i, 0);
|
||||
}
|
||||
|
||||
mpv_request_log_messages(MainHandle, "no");
|
||||
|
||||
@@ -194,7 +196,9 @@ public class MainPlayer : MpvClient
|
||||
mpv_destroy(Handle);
|
||||
|
||||
foreach (var client in Clients)
|
||||
{
|
||||
mpv_destroy(client.Handle);
|
||||
}
|
||||
}
|
||||
|
||||
public void ProcessProperty(string? name, string? value)
|
||||
@@ -263,6 +267,8 @@ public class MainPlayer : MpvClient
|
||||
}
|
||||
}
|
||||
|
||||
private readonly Regex ConfRegex = new Regex("^[\\w-]+$", RegexOptions.Compiled);
|
||||
|
||||
Dictionary<string, string>? _Conf;
|
||||
|
||||
public Dictionary<string, string> Conf {
|
||||
@@ -273,7 +279,7 @@ public class MainPlayer : MpvClient
|
||||
|
||||
App.ApplyInputDefaultBindingsFix();
|
||||
|
||||
_Conf = new Dictionary<string, string>();
|
||||
_Conf = [];
|
||||
|
||||
if (File.Exists(ConfPath))
|
||||
{
|
||||
@@ -281,12 +287,12 @@ public class MainPlayer : MpvClient
|
||||
{
|
||||
string line = it.TrimStart(' ', '-').TrimEnd();
|
||||
|
||||
if (line.StartsWith("#"))
|
||||
if (line.StartsWith('#'))
|
||||
continue;
|
||||
|
||||
if (!line.Contains('='))
|
||||
{
|
||||
if (Regex.Match(line, "^[\\w-]+$").Success)
|
||||
if (ConfRegex.Match(line).Success)
|
||||
line += "=yes";
|
||||
else
|
||||
continue;
|
||||
@@ -305,7 +311,9 @@ public class MainPlayer : MpvClient
|
||||
}
|
||||
|
||||
foreach (var i in _Conf)
|
||||
{
|
||||
ProcessProperty(i.Key, i.Value);
|
||||
}
|
||||
|
||||
return _Conf;
|
||||
}
|
||||
@@ -331,7 +339,9 @@ public class MainPlayer : MpvClient
|
||||
public void MainEventLoop()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
mpv_wait_event(MainHandle, -1);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnShutdown()
|
||||
@@ -479,14 +489,14 @@ public class MainPlayer : MpvClient
|
||||
Command("stop");
|
||||
Thread.Sleep(500);
|
||||
SetPropertyString("dvd-device", path);
|
||||
LoadFiles(new[] { @"dvd://" }, false, false);
|
||||
LoadFiles([@"dvd://"], false, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
Command("stop");
|
||||
Thread.Sleep(500);
|
||||
SetPropertyString("bluray-device", path);
|
||||
LoadFiles(new[] { @"bd://" }, false, false);
|
||||
LoadFiles([@"bd://"], false, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -498,12 +508,12 @@ public class MainPlayer : MpvClient
|
||||
if (Directory.Exists(path + "\\BDMV"))
|
||||
{
|
||||
SetPropertyString("bluray-device", path);
|
||||
LoadFiles(new[] { @"bd://" }, false, false);
|
||||
LoadFiles([@"bd://"], false, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetPropertyString("dvd-device", path);
|
||||
LoadFiles(new[] { @"dvd://" }, false, false);
|
||||
LoadFiles([@"dvd://"], false, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -601,8 +611,10 @@ public class MainPlayer : MpvClient
|
||||
static string GetNativeLanguage(string name)
|
||||
{
|
||||
foreach (CultureInfo ci in CultureInfo.GetCultures(CultureTypes.NeutralCultures))
|
||||
{
|
||||
if (ci.EnglishName == name)
|
||||
return ci.NativeName;
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
@@ -629,7 +641,7 @@ public class MainPlayer : MpvClient
|
||||
if (_audioDevices != null)
|
||||
return _audioDevices;
|
||||
|
||||
_audioDevices = new();
|
||||
_audioDevices = [];
|
||||
string json = GetPropertyString("audio-device-list");
|
||||
var enumerator = JsonDocument.Parse(json).RootElement.EnumerateArray();
|
||||
|
||||
@@ -680,6 +692,8 @@ public class MainPlayer : MpvClient
|
||||
}
|
||||
}
|
||||
|
||||
private readonly Regex TitleRegex = new Regex(@"^[\._\-]", RegexOptions.Compiled);
|
||||
|
||||
public List<MediaTrack> GetTracks(bool includeInternal = true, bool includeExternal = true)
|
||||
{
|
||||
List<MediaTrack> tracks = new List<MediaTrack>();
|
||||
@@ -697,7 +711,7 @@ public class MainPlayer : MpvClient
|
||||
string filename = GetPropertyString($"filename/no-ext");
|
||||
string title = GetPropertyString($"track-list/{i}/title").Replace(filename, "");
|
||||
|
||||
title = Regex.Replace(title, @"^[\._\-]", "");
|
||||
title = TitleRegex.Replace(title, "");
|
||||
|
||||
if (type == "video")
|
||||
{
|
||||
@@ -1043,7 +1057,7 @@ public class MainPlayer : MpvClient
|
||||
if (_profileNames != null)
|
||||
return _profileNames;
|
||||
|
||||
string[] ignore = { "builtin-pseudo-gui", "encoding", "libmpv", "pseudo-gui", "default" };
|
||||
string[] ignore = ["builtin-pseudo-gui", "encoding", "libmpv", "pseudo-gui", "default"];
|
||||
string json = GetPropertyString("profile-list");
|
||||
return _profileNames = JsonDocument.Parse(json).RootElement.EnumerateArray()
|
||||
.Select(it => it.GetProperty("name").GetString())
|
||||
|
||||
Reference in New Issue
Block a user