fix possible race condition
This commit is contained in:
@@ -1276,12 +1276,17 @@ namespace mpvnet
|
||||
}
|
||||
}
|
||||
|
||||
static object LoadFolderLockObject = new object();
|
||||
|
||||
public void LoadFolder()
|
||||
{
|
||||
if (!App.AutoLoadFolder || Control.ModifierKeys.HasFlag(Keys.Shift))
|
||||
return;
|
||||
|
||||
Thread.Sleep(1000);
|
||||
|
||||
lock (LoadFolderLockObject)
|
||||
{
|
||||
string path = GetPropertyString("path");
|
||||
|
||||
if (!File.Exists(path) || GetPropertyInt("playlist-count") != 1)
|
||||
@@ -1312,6 +1317,7 @@ namespace mpvnet
|
||||
if (index > 0)
|
||||
CommandV("playlist-move", "0", (index + 1).ToString());
|
||||
}
|
||||
}
|
||||
|
||||
bool WasAviSynthLoaded;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user