auto-load-folder threading stability
This commit is contained in:
@@ -238,9 +238,6 @@ Shows a file browser dialog to open external subtitle files.
|
||||
Opens the config folder with Windows File Explorer.
|
||||
|
||||
### open-files [\<flags\>]
|
||||
**no-folder**
|
||||
For single files prevents loading the complete folder into the playlist.
|
||||
|
||||
**append**
|
||||
Appends files to the playlist.
|
||||
|
||||
|
||||
@@ -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);
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user