Compare commits

...

3 Commits

Author SHA1 Message Date
stax76
fb294c441d 6.0.2.0 2022-07-02 10:19:19 +02:00
stax76
03b775370b window title fix 2022-07-02 09:35:15 +02:00
stax76
1015f87533 changelog fix 2022-06-30 15:19:42 +02:00
5 changed files with 41 additions and 7 deletions

View File

@@ -1,5 +1,10 @@
# 6.0.1.0 # 6.0.2.0 (2022-07-02)
- Fix main window shown collapsed when the player was started with full screen.
# 6.0.1.0 (2022-06-30)
- New tutorial: [Extending mpv and mpv.net via Lua scripting](https://github.com/stax76/mpv.net/wiki/Extending-mpv-and-mpv.net-via-Lua-scripting) - New tutorial: [Extending mpv and mpv.net via Lua scripting](https://github.com/stax76/mpv.net/wiki/Extending-mpv-and-mpv.net-via-Lua-scripting)
- New options `autofit-image` and `autofit-audio`, like autofit, but used for image and audio files. - New options `autofit-image` and `autofit-audio`, like autofit, but used for image and audio files.

View File

@@ -1194,6 +1194,9 @@ namespace mpvnet
{ {
string file = files[i]; string file = files[i];
if (file.Contains("|"))
file = file.Substring(0, file.IndexOf("|"));
if (file.Ext() == "avs") if (file.Ext() == "avs")
LoadAviSynth(); LoadAviSynth();

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("6.0.1.0")] [assembly: AssemblyVersion("6.0.2.0")]
[assembly: AssemblyFileVersion("6.0.1.0")] [assembly: AssemblyFileVersion("6.0.2.0")]

View File

@@ -50,7 +50,7 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(288F, 288F); this.AutoScaleDimensions = new System.Drawing.SizeF(288F, 288F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.BackColor = System.Drawing.Color.Black; this.BackColor = System.Drawing.Color.Black;
this.ClientSize = new System.Drawing.Size(348, 0); this.ClientSize = new System.Drawing.Size(857, 444);
this.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);

View File

@@ -48,7 +48,7 @@ namespace mpvnet
Core.FileLoaded += Core_FileLoaded; Core.FileLoaded += Core_FileLoaded;
Core.Pause += Core_Pause; Core.Pause += Core_Pause;
Core.PlaylistPosChanged += (value) => SetTitle(); Core.PlaylistPosChanged += Core_PlaylistPosChanged;
Core.ScaleWindow += Core_ScaleWindow; Core.ScaleWindow += Core_ScaleWindow;
Core.Seek += () => UpdateProgressBar(); Core.Seek += () => UpdateProgressBar();
Core.ShowMenu += Core_ShowMenu; Core.ShowMenu += Core_ShowMenu;
@@ -118,6 +118,12 @@ namespace mpvnet
} }
} }
private void Core_PlaylistPosChanged(int pos)
{
if (pos == -1)
SetTitle();
}
void Init() void Init()
{ {
Core.Init(Handle); Core.Init(Handle);
@@ -614,8 +620,13 @@ namespace mpvnet
if (WasMaximized) if (WasMaximized)
WindowState = FormWindowState.Maximized; WindowState = FormWindowState.Maximized;
else else
{
WindowState = FormWindowState.Normal; WindowState = FormWindowState.Normal;
if (!Core.WasInitialSizeSet)
SetFormPosAndSize();
}
if (Core.Border) if (Core.Border)
FormBorderStyle = FormBorderStyle.Sizable; FormBorderStyle = FormBorderStyle.Sizable;
else else
@@ -720,7 +731,7 @@ namespace mpvnet
void Core_FileLoaded() void Core_FileLoaded()
{ {
BeginInvoke(new Action(() => { BeginInvoke(new Action(() => {
Text = Core.Expand(Title); SetTitleInternal();
int interval = (int)(Core.Duration.TotalMilliseconds / 100); int interval = (int)(Core.Duration.TotalMilliseconds / 100);
@@ -759,7 +770,22 @@ namespace mpvnet
} }
} }
void SetTitle() => BeginInvoke(new Action(() => Text = Core.Expand(Title))); void SetTitle() => BeginInvoke(new Action(() => SetTitleInternal()));
void SetTitleInternal()
{
string title = Title;
if (title == "${filename}" && Core.Path.ContainsEx("://"))
title = "${media-title}";
string text = Core.Expand(title);
if (text == "(unavailable)")
text = "mpv.net";
Text = text;
}
public void Voodoo() public void Voodoo()
{ {