Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a6bf5a481 | ||
|
|
40565e8b3d | ||
|
|
fb294c441d | ||
|
|
03b775370b | ||
|
|
1015f87533 |
@@ -1,5 +1,15 @@
|
||||
|
||||
# 6.0.1.0
|
||||
# 6.0.3.0 (2022-07-03)
|
||||
|
||||
- Fix the rare occasion of duplicated playlist entries produced by the auto-load-folder feature.
|
||||
|
||||
|
||||
# 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 options `autofit-image` and `autofit-audio`, like autofit, but used for image and audio files.
|
||||
|
||||
@@ -1194,6 +1194,9 @@ namespace mpvnet
|
||||
{
|
||||
string file = files[i];
|
||||
|
||||
if (file.Contains("|"))
|
||||
file = file.Substring(0, file.IndexOf("|"));
|
||||
|
||||
if (file.Ext() == "avs")
|
||||
LoadAviSynth();
|
||||
|
||||
@@ -1273,41 +1276,47 @@ namespace mpvnet
|
||||
}
|
||||
}
|
||||
|
||||
static object LoadFolderLockObject = new object();
|
||||
|
||||
public void LoadFolder()
|
||||
{
|
||||
if (!App.AutoLoadFolder || Control.ModifierKeys.HasFlag(Keys.Shift))
|
||||
return;
|
||||
|
||||
Thread.Sleep(1000);
|
||||
string path = GetPropertyString("path");
|
||||
|
||||
if (!File.Exists(path) || GetPropertyInt("playlist-count") != 1)
|
||||
return;
|
||||
lock (LoadFolderLockObject)
|
||||
{
|
||||
string path = GetPropertyString("path");
|
||||
|
||||
string dir = Environment.CurrentDirectory;
|
||||
if (!File.Exists(path) || GetPropertyInt("playlist-count") != 1)
|
||||
return;
|
||||
|
||||
if (path.Contains(":/") && !path.Contains("://"))
|
||||
path = path.Replace("/", "\\");
|
||||
string dir = Environment.CurrentDirectory;
|
||||
|
||||
if (path.Contains("\\"))
|
||||
dir = System.IO.Path.GetDirectoryName(path);
|
||||
if (path.Contains(":/") && !path.Contains("://"))
|
||||
path = path.Replace("/", "\\");
|
||||
|
||||
List<string> files = Directory.GetFiles(dir).ToList();
|
||||
if (path.Contains("\\"))
|
||||
dir = System.IO.Path.GetDirectoryName(path);
|
||||
|
||||
files = files.Where(file =>
|
||||
VideoTypes.Contains(file.Ext()) ||
|
||||
AudioTypes.Contains(file.Ext()) ||
|
||||
ImageTypes.Contains(file.Ext())).ToList();
|
||||
List<string> files = Directory.GetFiles(dir).ToList();
|
||||
|
||||
files.Sort(new StringLogicalComparer());
|
||||
int index = files.IndexOf(path);
|
||||
files.Remove(path);
|
||||
files = files.Where(file =>
|
||||
VideoTypes.Contains(file.Ext()) ||
|
||||
AudioTypes.Contains(file.Ext()) ||
|
||||
ImageTypes.Contains(file.Ext())).ToList();
|
||||
|
||||
foreach (string i in files)
|
||||
CommandV("loadfile", i, "append");
|
||||
files.Sort(new StringLogicalComparer());
|
||||
int index = files.IndexOf(path);
|
||||
files.Remove(path);
|
||||
|
||||
if (index > 0)
|
||||
CommandV("playlist-move", "0", (index + 1).ToString());
|
||||
foreach (string i in files)
|
||||
CommandV("loadfile", i, "append");
|
||||
|
||||
if (index > 0)
|
||||
CommandV("playlist-move", "0", (index + 1).ToString());
|
||||
}
|
||||
}
|
||||
|
||||
bool WasAviSynthLoaded;
|
||||
|
||||
@@ -23,7 +23,6 @@ namespace mpvnet
|
||||
public Size WindowSize;
|
||||
public string ConfigEditorSearch = "Video:";
|
||||
public string Mute = "no";
|
||||
public string UpdateCheckVersion = "";
|
||||
}
|
||||
|
||||
class SettingsManager
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("6.0.1.0")]
|
||||
[assembly: AssemblyFileVersion("6.0.1.0")]
|
||||
[assembly: AssemblyVersion("6.0.3.0")]
|
||||
[assembly: AssemblyFileVersion("6.0.3.0")]
|
||||
|
||||
2
src/WinForms/MainForm.Designer.cs
generated
2
src/WinForms/MainForm.Designer.cs
generated
@@ -50,7 +50,7 @@
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(288F, 288F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
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.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace mpvnet
|
||||
|
||||
Core.FileLoaded += Core_FileLoaded;
|
||||
Core.Pause += Core_Pause;
|
||||
Core.PlaylistPosChanged += (value) => SetTitle();
|
||||
Core.PlaylistPosChanged += Core_PlaylistPosChanged;
|
||||
Core.ScaleWindow += Core_ScaleWindow;
|
||||
Core.Seek += () => UpdateProgressBar();
|
||||
Core.ShowMenu += Core_ShowMenu;
|
||||
@@ -118,6 +118,12 @@ namespace mpvnet
|
||||
}
|
||||
}
|
||||
|
||||
private void Core_PlaylistPosChanged(int pos)
|
||||
{
|
||||
if (pos == -1)
|
||||
SetTitle();
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
Core.Init(Handle);
|
||||
@@ -614,7 +620,12 @@ namespace mpvnet
|
||||
if (WasMaximized)
|
||||
WindowState = FormWindowState.Maximized;
|
||||
else
|
||||
{
|
||||
WindowState = FormWindowState.Normal;
|
||||
|
||||
if (!Core.WasInitialSizeSet)
|
||||
SetFormPosAndSize();
|
||||
}
|
||||
|
||||
if (Core.Border)
|
||||
FormBorderStyle = FormBorderStyle.Sizable;
|
||||
@@ -720,7 +731,7 @@ namespace mpvnet
|
||||
void Core_FileLoaded()
|
||||
{
|
||||
BeginInvoke(new Action(() => {
|
||||
Text = Core.Expand(Title);
|
||||
SetTitleInternal();
|
||||
|
||||
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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user