Save DatabaseSongID to CSong for (should be) faster saving of NumPlayed and Scores.

This commit is contained in:
Florian Küpper committed 2013-08-21 20:55:49 +02:00
1 parent bb8166351f
commit fb9476d1cf
5 files changed
+13 -8

No files matched your search

+1 -1
View File
@@ -262,7 +262,7 @@ namespace VocaluxeLib
public interface IDataBase
{
bool GetCover(string fileName, ref CTexture texture, int coverSize);
bool GetDataBaseSongInfos(string artist, string title, out int numPlayed, out string dateAdded);
bool GetDataBaseSongInfos(string artist, string title, out int numPlayed, out string dateAdded, out int highscoreID);
}
public interface IControllers
+4 -1
View File
@@ -147,6 +147,7 @@ namespace VocaluxeLib.Songs
public readonly List<string> Language = new List<string>();
public int DataBaseSongID = -1;
public string DateAdded = "";
public int NumPlayed = 0;
@@ -243,7 +244,9 @@ namespace VocaluxeLib.Songs
foreach (string value in song.Language)
Language.Add(value);
DataBaseSongID = song.DataBaseSongID;
DateAdded = song.DateAdded;
NumPlayed = song.NumPlayed;
Notes = new CNotes(song.Notes);
}
@@ -535,7 +538,7 @@ namespace VocaluxeLib.Songs
sr.Dispose();
_CheckFiles();
CBase.DataBase.GetDataBaseSongInfos(Artist, Title, out NumPlayed, out DateAdded);
CBase.DataBase.GetDataBaseSongInfos(Artist, Title, out NumPlayed, out DateAdded, out DataBaseSongID);
//Before saving this tags to .txt: Check, if ArtistSorting and Artist are equal, then don't save this tag.
if (ArtistSorting == "")