clipboard monitoring feature removed because it was causing to many issues

This commit is contained in:
Frank Skare
2019-10-13 04:37:18 +02:00
parent 0cd769fc0c
commit 625dddcfbb
4 changed files with 1 additions and 34 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -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"

View File

@@ -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;
}
}
}
}
}