Command line parser fix using list options with -add suffix

This commit is contained in:
stax76
2023-12-19 12:12:34 +01:00
parent a3b9c653fa
commit ab8a8d5a35
3 changed files with 7 additions and 3 deletions

View File

@@ -1,4 +1,8 @@
# v7.0.0.5 Beta (2023-??-??)
- Command line parser fix using list options with `-add` suffix.
# v7.0.0.4 Beta (2023-12-19) # v7.0.0.4 Beta (2023-12-19)
- When mpv.net is started for the first time from a new startup location, - When mpv.net is started for the first time from a new startup location,

View File

@@ -35,7 +35,7 @@ public class WinMpvHelp
} }
else else
Msg.ShowInfo("If you want to add mpv.net to the Path environment variable later," + BR + Msg.ShowInfo("If you want to add mpv.net to the Path environment variable later," + BR +
"you can do so with the context menu (Settings/Setup)"); "you can do so with the context menu (Settings/Setup).");
} }
var result2 = Msg.ShowQuestion("Would you like to register video file associations?", MessageBoxButton.YesNo); var result2 = Msg.ShowQuestion("Would you like to register video file associations?", MessageBoxButton.YesNo);
@@ -51,7 +51,7 @@ public class WinMpvHelp
} }
else else
Msg.ShowInfo("If you want to register file associations later," + BR + Msg.ShowInfo("If you want to register file associations later," + BR +
"you can do so with the context menu (Settings/Setup)"); "you can do so with the context menu (Settings/Setup).");
RegistryHelp.SetString("Setup", Folder.Startup); RegistryHelp.SetString("Setup", Folder.Startup);
} }

View File

@@ -435,7 +435,7 @@ public class MainPlayer : MpvClient
{ {
string name = pair.Name[..^4]; string name = pair.Name[..^4];
string separator = name.Contains("-file") || name.Contains("-path") ? ";" : ","; string separator = name.Contains("-file") || name.Contains("-path") ? ";" : ",";
SetPropertyString(name, GetPropertyString(name) + separator + pair.Value); SetPropertyString(name, (GetPropertyString(name) + separator + pair.Value).TrimStart(','));
} }
} }
} }