From 6fc546c69c362bebcbc949a3edcb267a9d01ae29 Mon Sep 17 00:00:00 2001 From: stax76 Date: Sun, 22 May 2022 15:49:25 +0200 Subject: [PATCH] auto-load-folder threading stability --- docs/Manual.md | 3 --- src/Misc/Commands.cs | 8 +------- src/Misc/Player.cs | 3 --- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/docs/Manual.md b/docs/Manual.md index e563fbd..707be71 100644 --- a/docs/Manual.md +++ b/docs/Manual.md @@ -238,9 +238,6 @@ Shows a file browser dialog to open external subtitle files. Opens the config folder with Windows File Explorer. ### open-files [\] -**no-folder** -For single files prevents loading the complete folder into the playlist. - **append** Appends files to the playlist. diff --git a/src/Misc/Commands.cs b/src/Misc/Commands.cs index d4f2cd9..3ac5ac4 100644 --- a/src/Misc/Commands.cs +++ b/src/Misc/Commands.cs @@ -90,21 +90,15 @@ namespace mpvnet public static void OpenFiles(params string[] args) { bool append = Control.ModifierKeys.HasFlag(Keys.Control); - bool loadFolder = true; foreach (string arg in args) - { if (arg == "append") append = true; - if (arg == "no-folder") - loadFolder = false; - } - App.InvokeOnMainThread(new Action(() => { using (var d = new OpenFileDialog() { Multiselect = true }) if (d.ShowDialog() == DialogResult.OK) - Core.LoadFiles(d.FileNames, loadFolder, append); + Core.LoadFiles(d.FileNames, true, append); })); } diff --git a/src/Misc/Player.cs b/src/Misc/Player.cs index f7c5fd1..6140f1e 100644 --- a/src/Misc/Player.cs +++ b/src/Misc/Player.cs @@ -1156,9 +1156,6 @@ namespace mpvnet if (string.IsNullOrEmpty(GetPropertyString("path"))) SetPropertyInt("playlist-pos", 0); - - if (loadFolder && !append) - App.RunTask(() => LoadFolder()); } public void LoadISO(string path)