Loads faster if song-folder doesn't exist.
This commit is contained in:
1 parent
fcdd58f827
commit
f43116073d
1 file changed
+7
-3
@@ -20,6 +20,7 @@ using System.Collections.Generic;
|
|||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using System.IO;
|
||||||
using VocaluxeLib;
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Songs;
|
using VocaluxeLib.Songs;
|
||||||
|
|
||||||
@@ -340,9 +341,12 @@ namespace Vocaluxe.Base
|
|||||||
var files = new List<string>();
|
var files = new List<string>();
|
||||||
foreach (string p in CConfig.SongFolders)
|
foreach (string p in CConfig.SongFolders)
|
||||||
{
|
{
|
||||||
string path = p;
|
if (Directory.Exists(p))
|
||||||
files.AddRange(CHelper.ListFiles(path, "*.txt", true, true));
|
{
|
||||||
files.AddRange(CHelper.ListFiles(path, "*.txd", true, true));
|
string path = p;
|
||||||
|
files.AddRange(CHelper.ListFiles(path, "*.txt", true, true));
|
||||||
|
files.AddRange(CHelper.ListFiles(path, "*.txd", true, true));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
CLog.StopBenchmark("List Songs");
|
CLog.StopBenchmark("List Songs");
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user