Fix config editor handling keep-open incorrectly

This commit is contained in:
stax76
2022-05-03 14:25:15 +02:00
parent a15d2cdbbe
commit cd2f2aeec8
4 changed files with 10 additions and 24 deletions

View File

@@ -1,6 +1,7 @@
- Fix keyboard layout change not working.
- Fix multi monitor setup with different DPI values.
- Fix config editor handling `keep-open` incorrectly.
- New playlist-add command added to change the playlist position.
Ctrl+F11 goes 10 positions backward.
Ctrl+F12 goes 10 positions forward.

View File

@@ -271,7 +271,7 @@ namespace mpvnet
_ConfigFolder = _ConfigFolder.AddSep();
if (!File.Exists(_ConfigFolder + "input.conf"))
File.WriteAllText(_ConfigFolder + "input.conf", PatchInput(Properties.Resources.input_conf));
File.WriteAllText(_ConfigFolder + "input.conf", Properties.Resources.input_conf);
}
return _ConfigFolder;
@@ -301,28 +301,6 @@ namespace mpvnet
}
}
string PatchInput(string value)
{
if (Environment.GetEnvironmentVariable("username") == "frank" && Directory.Exists(@"D:\Projects\CS\mpv.net"))
value = value.Replace("volume 2 ", "volume 10")
.Replace("volume -2 ", "volume -10");
value += @"
KP2 script-message rate-file 2
2 script-message rate-file 2
KP3 script-message rate-file 3
3 script-message rate-file 3
KP4 script-message rate-file 4
4 script-message rate-file 4
KP5 script-message rate-file 5
5 script-message rate-file 5
KP0 script-binding delete_current_file/delete
0 script-binding delete_current_file/delete
KP1 script-binding delete_current_file/confirm
1 script-binding delete_current_file/confirm";
return value;
}
public void LoadScripts()
{
if (Directory.Exists(ConfigFolder + "scripts-ps"))

View File

@@ -6,6 +6,13 @@ $7z = 'C:\Program Files\7-Zip\7z.exe'
$targetDir = $tmpDir + "\mpv.net-$($versionInfo.FileVersion)-beta"
Copy-Item $PSScriptRoot\bin $targetDir -Recurse -Exclude 'System.Management.Automation.xml'
$folders = 'Debug', 'Release', 'x64', 'x86', 'Arm'
foreach ($folder in $folders) {
Remove-Item (Join-Path $targetDir $folder) -Recurse -ErrorAction SilentlyContinue
}
& $7z a -tzip -mx9 "$targetDir.zip" -r "$targetDir\*"
if ($LastExitCode) { throw $LastExitCode }

View File

@@ -518,7 +518,7 @@ option = no
[setting]
name = keep-open
file = mpv
default = no
default = yes
filter = Playback
help = Using no, mpv would terminate after the last file but mpv.net never terminates automatically.