bugfix for last commit
This commit is contained in:
1 parent
747b6edd1e
commit
8a527038bc
1 file changed
+7
-8
@@ -197,7 +197,7 @@ namespace Vocaluxe.Base
|
|||||||
if (!File.Exists(coverFilePath))
|
if (!File.Exists(coverFilePath))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
_AddCover(coverFilePath);
|
_AddCover(name, coverFilePath);
|
||||||
ignoreList.Add(Path.GetFileName(coverFilePath));
|
ignoreList.Add(Path.GetFileName(coverFilePath));
|
||||||
|
|
||||||
if (name == "NoCover")
|
if (name == "NoCover")
|
||||||
@@ -218,24 +218,23 @@ namespace Vocaluxe.Base
|
|||||||
foreach (string file in files)
|
foreach (string file in files)
|
||||||
{
|
{
|
||||||
if (!ignoreList.Contains(Path.GetFileName(file)))
|
if (!ignoreList.Contains(Path.GetFileName(file)))
|
||||||
_AddCover(file);
|
_AddCover(Path.GetFileNameWithoutExtension(file), file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void _AddCover(string File)
|
private static void _AddCover(string Name, string File)
|
||||||
{
|
{
|
||||||
string name = Path.GetFileNameWithoutExtension(File);
|
|
||||||
CTexture texture = CDraw.AddTexture(File);
|
CTexture texture = CDraw.AddTexture(File);
|
||||||
|
|
||||||
if (!_CoverExists(name))
|
if (!_CoverExists(Name))
|
||||||
{
|
{
|
||||||
_Cover.Add(name, texture);
|
_Cover.Add(Name, texture);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CTexture tex = _Cover[name];
|
CTexture tex = _Cover[Name];
|
||||||
CDraw.RemoveTexture(ref tex);
|
CDraw.RemoveTexture(ref tex);
|
||||||
_Cover[name] = texture;
|
_Cover[Name] = texture;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user