multi select files in File Explorer fix
This commit is contained in:
@@ -1,6 +1,11 @@
|
|||||||
###
|
###
|
||||||
|
|
||||||
- fix: window restore was broken
|
- fix: window restore was broken
|
||||||
|
- fix: it's possible to multi select files in File Explorer and press
|
||||||
|
enter to open the files, this did however only work when the
|
||||||
|
auto load folder feature was disabled or the shift key was
|
||||||
|
pressed (blocks auto load folder). Now it should also work
|
||||||
|
without shift key and with auto load folder being enabled.
|
||||||
|
|
||||||
### 5.4.2.1 Beta
|
### 5.4.2.1 Beta
|
||||||
|
|
||||||
|
|||||||
11
Clean.ps1
11
Clean.ps1
@@ -1,11 +0,0 @@
|
|||||||
function Remove($path) {
|
|
||||||
if (Test-Path $path) {
|
|
||||||
Remove-Item $path -Recurse -Force
|
|
||||||
} else {
|
|
||||||
Write-Host "Path don't exist: $path"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Remove("obj")
|
|
||||||
Remove(".vs")
|
|
||||||
Remove("*.csproj.user")
|
|
||||||
@@ -695,7 +695,7 @@ namespace mpvnet
|
|||||||
|
|
||||||
HideLogo();
|
HideLogo();
|
||||||
|
|
||||||
if ((DateTime.Now - LastLoad).TotalMilliseconds < 500)
|
if ((DateTime.Now - LastLoad).TotalMilliseconds < 1000)
|
||||||
append = true;
|
append = true;
|
||||||
|
|
||||||
LastLoad = DateTime.Now;
|
LastLoad = DateTime.Now;
|
||||||
@@ -713,27 +713,34 @@ namespace mpvnet
|
|||||||
set_property_int("playlist-pos", 0);
|
set_property_int("playlist-pos", 0);
|
||||||
|
|
||||||
if (loadFolder && !append)
|
if (loadFolder && !append)
|
||||||
Task.Run(() => LoadFolder()); // user reported race condition
|
Task.Run(() => LoadFolder());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void LoadFolder()
|
public static void LoadFolder()
|
||||||
{
|
{
|
||||||
if (!App.AutoLoadFolder || Control.ModifierKeys.HasFlag(Keys.Shift))
|
if (!App.AutoLoadFolder || Control.ModifierKeys.HasFlag(Keys.Shift))
|
||||||
return;
|
return;
|
||||||
Thread.Sleep(200); // user reported race condition
|
|
||||||
|
Thread.Sleep(1000);
|
||||||
string path = get_property_string("path");
|
string path = get_property_string("path");
|
||||||
|
|
||||||
if (!File.Exists(path) || get_property_int("playlist-count") != 1)
|
if (!File.Exists(path) || get_property_int("playlist-count") != 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
List<string> files = Directory.GetFiles(Path.GetDirectoryName(path)).ToList();
|
List<string> files = Directory.GetFiles(Path.GetDirectoryName(path)).ToList();
|
||||||
|
|
||||||
files = files.Where(file =>
|
files = files.Where(file =>
|
||||||
App.VideoTypes.Contains(file.ShortExt()) ||
|
App.VideoTypes.Contains(file.ShortExt()) ||
|
||||||
App.AudioTypes.Contains(file.ShortExt()) ||
|
App.AudioTypes.Contains(file.ShortExt()) ||
|
||||||
App.ImageTypes.Contains(file.ShortExt())).ToList();
|
App.ImageTypes.Contains(file.ShortExt())).ToList();
|
||||||
|
|
||||||
files.Sort(new StringLogicalComparer());
|
files.Sort(new StringLogicalComparer());
|
||||||
int index = files.IndexOf(path);
|
int index = files.IndexOf(path);
|
||||||
files.Remove(path);
|
files.Remove(path);
|
||||||
|
|
||||||
foreach (string i in files)
|
foreach (string i in files)
|
||||||
commandv("loadfile", i, "append");
|
commandv("loadfile", i, "append");
|
||||||
|
|
||||||
if (index > 0)
|
if (index > 0)
|
||||||
commandv("playlist-move", "0", (index + 1).ToString());
|
commandv("playlist-move", "0", (index + 1).ToString());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user