New mpv.net specific option keep-open-exit added
This commit is contained in:
@@ -1,8 +1,11 @@
|
|||||||
|
|
||||||
- Fix keyboard layout change not working.
|
- Fix keyboard layout change.
|
||||||
- Fix multi monitor setup with different DPI values.
|
- Fix multi monitor setup with different DPI values.
|
||||||
- Fix config editor handling `keep-open` incorrectly.
|
- Fix config editor handling `keep-open` and `keep-open-pause` incorrectly.
|
||||||
- New playlist-add command added to change the playlist position.
|
- New mpv.net specific option `keep-open-exit` added. If set to yes and
|
||||||
|
keep-open is set to no, mpv.net exits after the last file ends.
|
||||||
|
- New `playlist-add` command added to change the playlist position,
|
||||||
|
jumps to the other end when the beginning or end is reached.
|
||||||
Ctrl+F11 goes 10 positions backward.
|
Ctrl+F11 goes 10 positions backward.
|
||||||
Ctrl+F12 goes 10 positions forward.
|
Ctrl+F12 goes 10 positions forward.
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ namespace mpvnet
|
|||||||
public static bool AutoPlay { get; set; }
|
public static bool AutoPlay { get; set; }
|
||||||
public static bool DebugMode { get; set; }
|
public static bool DebugMode { get; set; }
|
||||||
public static bool IsTerminalAttached { get; } = Environment.GetEnvironmentVariable("_started_from_console") == "yes";
|
public static bool IsTerminalAttached { get; } = Environment.GetEnvironmentVariable("_started_from_console") == "yes";
|
||||||
|
public static bool KeepOpenExit { get; set; }
|
||||||
public static bool Queue { get; set; }
|
public static bool Queue { get; set; }
|
||||||
public static bool RememberVolume { get; set; } = true;
|
public static bool RememberVolume { get; set; } = true;
|
||||||
public static bool RememberWindowPosition { get; set; }
|
public static bool RememberWindowPosition { get; set; }
|
||||||
@@ -241,14 +242,15 @@ namespace mpvnet
|
|||||||
case "dark-theme": DarkTheme = value.Trim('\'', '"'); return true;
|
case "dark-theme": DarkTheme = value.Trim('\'', '"'); return true;
|
||||||
case "debug-mode": DebugMode = value == "yes"; return true;
|
case "debug-mode": DebugMode = value == "yes"; return true;
|
||||||
case "image-file-extensions": CorePlayer.ImageTypes = value.Split(" ,;".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); return true;
|
case "image-file-extensions": CorePlayer.ImageTypes = value.Split(" ,;".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); return true;
|
||||||
|
case "keep-open-exit": KeepOpenExit = value == "yes"; return true;
|
||||||
case "light-theme": LightTheme = value.Trim('\'', '"'); return true;
|
case "light-theme": LightTheme = value.Trim('\'', '"'); return true;
|
||||||
case "minimum-aspect-ratio": MinimumAspectRatio = value.ToFloat(); return true;
|
case "minimum-aspect-ratio": MinimumAspectRatio = value.ToFloat(); return true;
|
||||||
case "process-instance": ProcessInstance = value; return true;
|
case "process-instance": ProcessInstance = value; return true;
|
||||||
case "queue": Queue = value == "yes"; return true;
|
case "queue": Queue = value == "yes"; return true;
|
||||||
case "recent-count": RecentCount = value.ToInt(); return true;
|
case "recent-count": RecentCount = value.ToInt(); return true;
|
||||||
case "remember-volume": RememberVolume = value == "yes"; return true;
|
case "remember-volume": RememberVolume = value == "yes"; return true;
|
||||||
case "show-logo": ShowLogo = value == "yes"; return true;
|
|
||||||
case "remember-window-position": RememberWindowPosition = value == "yes"; return true;
|
case "remember-window-position": RememberWindowPosition = value == "yes"; return true;
|
||||||
|
case "show-logo": ShowLogo = value == "yes"; return true;
|
||||||
case "start-size": StartSize = value; return true;
|
case "start-size": StartSize = value; return true;
|
||||||
case "start-threshold": StartThreshold = value.ToInt(); return true;
|
case "start-threshold": StartThreshold = value.ToInt(); return true;
|
||||||
case "video-file-extensions": CorePlayer.VideoTypes = value.Split(" ,;".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); return true;
|
case "video-file-extensions": CorePlayer.VideoTypes = value.Split(" ,;".ToCharArray(), StringSplitOptions.RemoveEmptyEntries); return true;
|
||||||
|
|||||||
@@ -139,8 +139,6 @@ namespace mpvnet
|
|||||||
|
|
||||||
SetPropertyInt("osd-duration", 2000);
|
SetPropertyInt("osd-duration", 2000);
|
||||||
|
|
||||||
SetPropertyBool("keep-open", true);
|
|
||||||
SetPropertyBool("keep-open-pause", false);
|
|
||||||
SetPropertyBool("input-default-bindings", true);
|
SetPropertyBool("input-default-bindings", true);
|
||||||
SetPropertyBool("input-builtin-bindings", false);
|
SetPropertyBool("input-builtin-bindings", false);
|
||||||
|
|
||||||
@@ -162,7 +160,7 @@ namespace mpvnet
|
|||||||
{
|
{
|
||||||
ShowLogo();
|
ShowLogo();
|
||||||
|
|
||||||
if (GetPropertyString("keep-open") == "no")
|
if (GetPropertyString("keep-open") == "no" && App.KeepOpenExit)
|
||||||
Core.CommandV("quit");
|
Core.CommandV("quit");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -505,6 +505,17 @@ help = Show progress in taskbar.
|
|||||||
option = yes
|
option = yes
|
||||||
option = no
|
option = no
|
||||||
|
|
||||||
|
[setting]
|
||||||
|
name = keep-open
|
||||||
|
file = mpv
|
||||||
|
default = no
|
||||||
|
filter = Playback
|
||||||
|
help = Using no, mpv would terminate after the last file but mpv.net never terminates automatically.
|
||||||
|
|
||||||
|
option = yes If the current file ends, go to the next file, keep the last file open.
|
||||||
|
option = no If the current file ends, go to the next file.
|
||||||
|
option = always Playback will never automatically advance to the next file.
|
||||||
|
|
||||||
[setting]
|
[setting]
|
||||||
name = keep-open-pause
|
name = keep-open-pause
|
||||||
file = mpv
|
file = mpv
|
||||||
@@ -516,15 +527,14 @@ option = yes
|
|||||||
option = no
|
option = no
|
||||||
|
|
||||||
[setting]
|
[setting]
|
||||||
name = keep-open
|
name = keep-open-exit
|
||||||
file = mpv
|
file = mpvnet
|
||||||
default = yes
|
default = no
|
||||||
filter = Playback
|
filter = Playback
|
||||||
help = Using no, mpv would terminate after the last file but mpv.net never terminates automatically.
|
help = If set to yes and keep-open is set to no, mpv.net exits after the last file ends.
|
||||||
|
|
||||||
option = yes If the current file ends, go to the next file, keep the last file open.
|
option = yes
|
||||||
option = no If the current file ends, go to the next file.
|
option = no
|
||||||
option = always Playback will never automatically advance to the next file.
|
|
||||||
|
|
||||||
[setting]
|
[setting]
|
||||||
name = auto-play
|
name = auto-play
|
||||||
|
|||||||
Reference in New Issue
Block a user