#268 Fix exception using named pipes
This commit is contained in:
@@ -2,10 +2,12 @@
|
||||
5.4.9.1 (2021-0?-??)
|
||||
====================
|
||||
|
||||
- Fix exception using named pipes.
|
||||
- The mpv window property keepaspect-window was implemented.
|
||||
- Everything search removed to keep the core player lightweight,
|
||||
it might come back as user script or extension.
|
||||
- Fancy new command palette implementation, it's now integrated into the main window.
|
||||
- Playlist is now shown with the new command palette and not using the OSD.
|
||||
- The command palette is integrated into the main window.
|
||||
- Playlist is shown with the command palette and not using the OSD.
|
||||
- New media info command: `Ctrl+m script-message mpv.net show-media-info #menu: View > Show Media Info`
|
||||
- Context menu font render quality fix.
|
||||
- Context menu and `cycle-audio` command supports external audio and subtitle tracks.
|
||||
|
||||
@@ -575,10 +575,11 @@ The documentation of mpvs window features can be found here:
|
||||
https://mpv.io/manual/master/#window
|
||||
|
||||
|
||||
mpv.net has currently implemented the following window features:
|
||||
mpv.net has currently implemented the following window properties:
|
||||
|
||||
- [border](https://mpv.io/manual/master/#options-border)
|
||||
- [fullscreen](https://mpv.io/manual/master/#options-fullscreen)
|
||||
- [keepaspect-window](https://mpv.io/manual/master/#options-keepaspect-window)
|
||||
- [ontop](https://mpv.io/manual/master/#options-ontop)
|
||||
- [screen](https://mpv.io/manual/master/#options-screen)
|
||||
- [title](https://mpv.io/manual/master/#options-title)
|
||||
|
||||
@@ -364,7 +364,7 @@ namespace mpvnet
|
||||
{
|
||||
string path = Core.GetPropertyString("path");
|
||||
|
||||
if (File.Exists(path))
|
||||
if (File.Exists(path) && !path.Contains(@"\\.\pipe\"))
|
||||
{
|
||||
using (MediaInfo mediaInfo = new MediaInfo(path))
|
||||
{
|
||||
|
||||
@@ -103,6 +103,7 @@ namespace mpvnet
|
||||
public bool Fullscreen { get; set; }
|
||||
public bool IsLogoVisible { set; get; } = true;
|
||||
public bool IsQuitNeeded { set; get; } = true;
|
||||
public bool KeepaspectWindow { get; set; }
|
||||
public bool TaskbarProgress { get; set; } = true;
|
||||
public bool WasInitialSizeSet;
|
||||
public bool WindowMaximized { get; set; }
|
||||
@@ -174,6 +175,7 @@ namespace mpvnet
|
||||
case "fs":
|
||||
case "fullscreen": Fullscreen = value == "yes"; break;
|
||||
case "border": Border = value == "yes"; break;
|
||||
case "keepaspect-window": KeepaspectWindow = value == "yes"; break;
|
||||
case "window-maximized": WindowMaximized = value == "yes"; break;
|
||||
case "window-minimized": WindowMinimized = value == "yes"; break;
|
||||
case "taskbar-progress": TaskbarProgress = value == "yes"; break;
|
||||
@@ -1336,7 +1338,7 @@ namespace mpvnet
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (File.Exists(path))
|
||||
else if (File.Exists(path) && !path.Contains(@"\\.\pipe\"))
|
||||
{
|
||||
using (MediaInfo mi = new MediaInfo(path))
|
||||
{
|
||||
|
||||
@@ -242,7 +242,6 @@ namespace mpvnet
|
||||
|
||||
public static IEnumerable<CommandPaletteItem> GetItems()
|
||||
{
|
||||
var aaa = CommandItem.Items.ToArray();
|
||||
return CommandItem.Items
|
||||
.Where(i => i.Command != "")
|
||||
.Select(i => new CommandPaletteItem() {
|
||||
|
||||
@@ -14,10 +14,12 @@ namespace mpvnet
|
||||
|
||||
public static Theme Current { get; set; }
|
||||
|
||||
public Brush Background { get; set; }
|
||||
public Brush Foreground { get; set; }
|
||||
public Brush Foreground2 { get; set; }
|
||||
public Brush Background { get; set; }
|
||||
public Brush Heading { get; set; }
|
||||
public Brush MenuBackground { get; set; }
|
||||
public Brush MenuHighlight { get; set; }
|
||||
|
||||
public System.Drawing.Color GetWinFormsColor(string key)
|
||||
{
|
||||
@@ -67,10 +69,12 @@ namespace mpvnet
|
||||
if (Current == null)
|
||||
Current = DefaultThemes[0];
|
||||
|
||||
Current.Background = Current.GetBrush("background");
|
||||
Current.Foreground = Current.GetBrush("foreground");
|
||||
Current.Foreground2 = Current.GetBrush("foreground2");
|
||||
Current.Background = Current.GetBrush("background");
|
||||
Current.Heading = Current.GetBrush("heading");
|
||||
Current.MenuBackground = Current.GetBrush("menu-background");
|
||||
Current.MenuHighlight = Current.GetBrush("menu-highlight");
|
||||
}
|
||||
|
||||
static List<Theme> Load(string content)
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace mpvnet
|
||||
|
||||
if (!match.Success)
|
||||
{
|
||||
App.ShowError("Update check is currently not available.");
|
||||
App.InvokeOnMainThread(() => App.ShowError("Update check is currently not available."));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace mpvnet
|
||||
if (onlineVersion <= currentVersion)
|
||||
{
|
||||
if (showUpToDateMessage)
|
||||
Msg.ShowInfo($"{Application.ProductName} is up to date.");
|
||||
App.InvokeOnMainThread(() => Msg.ShowInfo($"{Application.ProductName} is up to date."));
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -60,7 +60,7 @@ namespace mpvnet
|
||||
proc.StartInfo.UseShellExecute = true;
|
||||
proc.StartInfo.WorkingDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
|
||||
proc.StartInfo.FileName = "powershell.exe";
|
||||
proc.StartInfo.Arguments = $"-NoExit -ExecutionPolicy Bypass -File \"{Folder.Startup + "Setup\\update.ps1"}\" \"{url}\" \"{Folder.Startup.TrimEnd(Path.DirectorySeparatorChar)}\"";
|
||||
proc.StartInfo.Arguments = $"-NoExit -NoProfile -ExecutionPolicy Bypass -File \"{Folder.Startup + "Setup\\update.ps1"}\" \"{url}\" \"{Folder.Startup.TrimEnd(Path.DirectorySeparatorChar)}\"";
|
||||
|
||||
if (Folder.Startup.Contains("Program Files"))
|
||||
proc.StartInfo.Verb = "runas";
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
Loaded="OnLoaded"
|
||||
Background="{Binding Theme.Background}"
|
||||
>
|
||||
|
||||
|
||||
<UserControl.InputBindings>
|
||||
<KeyBinding Gesture="Esc" Command="{Binding EscapeCommand}"/>
|
||||
<KeyBinding Gesture="Enter" Command="{Binding ExecuteCommand}"/>
|
||||
@@ -37,7 +37,8 @@
|
||||
Background="{Binding Theme.Background}"
|
||||
BorderThickness="0"
|
||||
MaxHeight="202"
|
||||
SizeChanged="MainListView_SizeChanged" MouseUp="MainListView_MouseUp"
|
||||
SizeChanged="MainListView_SizeChanged"
|
||||
MouseUp="MainListView_MouseUp"
|
||||
>
|
||||
|
||||
<ListView.ItemContainerStyle>
|
||||
|
||||
@@ -53,10 +53,11 @@ namespace mpvnet
|
||||
Core.observe_property("window-maximized", PropChangeWindowMaximized);
|
||||
Core.observe_property("window-minimized", PropChangeWindowMinimized);
|
||||
|
||||
Core.observe_property_bool("pause", PropChangePause);
|
||||
Core.observe_property_bool("fullscreen", PropChangeFullscreen);
|
||||
Core.observe_property_bool("ontop", PropChangeOnTop);
|
||||
Core.observe_property_bool("border", PropChangeBorder);
|
||||
Core.observe_property_bool("fullscreen", PropChangeFullscreen);
|
||||
Core.observe_property_bool("keepaspect-window", value => Core.KeepaspectWindow = value);
|
||||
Core.observe_property_bool("ontop", PropChangeOnTop);
|
||||
Core.observe_property_bool("pause", PropChangePause);
|
||||
|
||||
Core.observe_property_string("sid", PropChangeSid);
|
||||
Core.observe_property_string("aid", PropChangeAid);
|
||||
@@ -751,6 +752,7 @@ namespace mpvnet
|
||||
}
|
||||
break;
|
||||
case 0x0214: // WM_SIZING
|
||||
if (Core.KeepaspectWindow)
|
||||
{
|
||||
RECT rc = Marshal.PtrToStructure<RECT>(m.LParam);
|
||||
RECT r = rc;
|
||||
|
||||
Reference in New Issue
Block a user