diff --git a/docs/Changelog.md b/docs/Changelog.md index 84e8036..9767813 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -5,6 +5,7 @@ - New options `autofit-image` and `autofit-audio`, like autofit but used for image and audio files. Default 80. - New [auto-mode](https://github.com/stax76/mpv-scripts) script to use mpv and mpv.net as image viewer and audio player. - Fix long commands causing key bindings not visible in the command palette. +- Fix logo overlap using mordenx.lua, if the file mordenx.lua exists, the mpv.net logo is disabled. # 6.0.0.0 Beta (2022-06-05) diff --git a/src/Misc/Player.cs b/src/Misc/Player.cs index 7f640f1..5982c72 100644 --- a/src/Misc/Player.cs +++ b/src/Misc/Player.cs @@ -69,19 +69,18 @@ namespace mpvnet public Dictionary>> BoolPropChangeActions { get; set; } = new Dictionary>>(); public Dictionary>> DoublePropChangeActions { get; set; } = new Dictionary>>(); public Dictionary>> StringPropChangeActions { get; set; } = new Dictionary>>(); - - public List MediaTracks { get; set; } = new List(); - public object MediaTracksLock { get; } = new object(); - public List> Chapters { get; set; } = new List>(); - public List BluRayTitles { get; } = new List(); + + public AutoResetEvent ShutdownAutoResetEvent { get; } = new AutoResetEvent(false); + public AutoResetEvent VideoSizeAutoResetEvent { get; } = new AutoResetEvent(false); public IntPtr Handle { get; set; } public IntPtr NamedHandle { get; set; } - + public List> Chapters { get; set; } = new List>(); + public List MediaTracks { get; set; } = new List(); + public List BluRayTitles { get; } = new List(); + public object MediaTracksLock { get; } = new object(); public Size VideoSize { get; set; } + public List Scripts { get; } = new List(); public TimeSpan Duration; - - public AutoResetEvent ShutdownAutoResetEvent { get; } = new AutoResetEvent(false); - public AutoResetEvent VideoSizeAutoResetEvent { get; } = new AutoResetEvent(false); public string ConfPath { get => ConfigFolder + "mpv.conf"; } public string GPUAPI { get; set; } = "auto"; @@ -152,6 +151,12 @@ namespace mpvnet Environment.SetEnvironmentVariable("mpv_client", "mpvnet"); + string scriptsFolder = ConfigFolder + "scripts"; + + if (Directory.Exists(scriptsFolder)) + foreach (string i in Directory.GetFiles(scriptsFolder)) + Scripts.Add(i.FileName().ToLower()); + mpv_error err = mpv_initialize(Handle); if (err < 0) @@ -1369,6 +1374,10 @@ namespace mpvnet if (!App.ShowLogo || MainForm.Instance == null || Core.Handle == IntPtr.Zero) return; + foreach (string i in Scripts) + if (i == "mordenx.lua") + return; + bool december = DateTime.Now.Month == 12; Rectangle cr = MainForm.Instance.ClientRectangle; int len = Convert.ToInt32(cr.Height / (december ? 4.5 : 5));