diff --git a/Changelog.md b/Changelog.md index e4ecfcc..4732e68 100644 --- a/Changelog.md +++ b/Changelog.md @@ -10,6 +10,7 @@ - fix: there was a issue fixed with the URL clipboard monitoring - fix: there was a sound when closed from taskbar due to a exception - fix: the log feature was not working +- fix: clipboard monitoring feature removed because it was causing to many issues - update: libmpv shinchiro 2019-10-06 - update: youtube-dl 2019-10-01 diff --git a/mpv.net/Misc/App.cs b/mpv.net/Misc/App.cs index 2fffc82..99e5e42 100644 --- a/mpv.net/Misc/App.cs +++ b/mpv.net/Misc/App.cs @@ -12,7 +12,6 @@ namespace mpvnet public static string[] AudioTypes { get; } = "mp3 mp2 ac3 ogg opus flac wav w64 m4a dts dtsma dtshr dtshd eac3 thd thd+ac3 mka aac mpa".Split(' '); public static string[] ImageTypes { get; } = {"jpg", "bmp", "gif", "png"}; public static string[] SubtitleTypes { get; } = { "srt", "ass", "idx", "sup", "ttxt", "ssa", "smi" }; - public static string[] UrlWhitelist { get; set; } = { "tube", "vimeo", "ard", "zdf" }; public static string RegPath { get; } = @"HKCU\Software\" + Application.ProductName; public static string ConfPath { get => mp.ConfigFolder + "mpvnet.conf"; } @@ -116,7 +115,6 @@ namespace mpvnet case "debug-mode": DebugMode = value == "yes"; return true; case "dark-color": DarkColor = value.Trim('\'', '"'); return true; case "light-color": LightColor = value.Trim('\'', '"'); return true; - case "url-whitelist": UrlWhitelist = value.Split(' ', ',', ';'); return true; case "remember-volume": RememberVolume = value == "yes"; return true; case "start-threshold": StartThreshold = value.Int(); return true; case "minimum-aspect-ratio": MinimumAspectRatio = value.Float(); return true; diff --git a/mpv.net/Resources/mpvNetConfToml.txt b/mpv.net/Resources/mpvNetConfToml.txt index 66e49b1..b39a78d 100644 --- a/mpv.net/Resources/mpvNetConfToml.txt +++ b/mpv.net/Resources/mpvNetConfToml.txt @@ -1,11 +1,4 @@ [[settings]] -name = "url-whitelist" -filter = "General" -type = "string" -help = "Whitelist setting to monitor the clipboard for URLs to play. (mpv.net specific setting)\n\nDefault: tube vimeo ard zdf\n\nHow to start mpv.net directly from Google Chrome is described in the manual:" -url = "https://github.com/stax76/mpv.net/blob/master/Manual.md#chrome-extension" - -[[settings]] name = "process-instance" default = "single" filter = "General" diff --git a/mpv.net/WinForms/MainForm.cs b/mpv.net/WinForms/MainForm.cs index 99c6da4..a337386 100644 --- a/mpv.net/WinForms/MainForm.cs +++ b/mpv.net/WinForms/MainForm.cs @@ -577,12 +577,6 @@ namespace mpvnet Task.Run(() => App.Extension = new Extension()); } - protected override void OnActivated(EventArgs e) - { - base.OnActivated(e); - CheckClipboardForURL(); - } - protected override void OnResize(EventArgs e) { base.OnResize(e); @@ -646,24 +640,5 @@ namespace mpvnet base.OnLostFocus(e); CursorHelp.Show(); } - - void CheckClipboardForURL() - { - string clipboard = Clipboard.GetText(); - - foreach (string url in App.UrlWhitelist) - { - if (clipboard.Contains("://") && !clipboard.Contains("\n") && - !clipboard.Contains(" ") && clipboard.Contains(url.ToLower().Trim()) && - RegHelp.GetString(App.RegPath, "LastURL") != clipboard && Visible) - { - if (Msg.ShowQuestion("Play URL?", clipboard) == MsgResult.OK) - mp.Load(new[] { clipboard }, true, Control.ModifierKeys.HasFlag(Keys.Control)); - - RegHelp.SetObject(App.RegPath, "LastURL", clipboard); - break; - } - } - } } } \ No newline at end of file