Fix renaming of Editions etc.
This commit is contained in:
1 parent
da91f177eb
commit
0a97a2e46d
5 files changed
+35
-19
No files matched your search
+1
-4
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Express 2012 for Windows Desktop
|
# Visual Studio 2012
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vocaluxe", "Vocaluxe\Vocaluxe.csproj", "{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Vocaluxe", "Vocaluxe\Vocaluxe.csproj", "{2A1E0F2D-5392-4BB7-B0A1-A9DFA13E79FF}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
{6F3E1874-F28A-40E9-AFBD-31934D593678} = {6F3E1874-F28A-40E9-AFBD-31934D593678}
|
{6F3E1874-F28A-40E9-AFBD-31934D593678} = {6F3E1874-F28A-40E9-AFBD-31934D593678}
|
||||||
@@ -154,7 +154,4 @@ Global
|
|||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(Performance) = preSolution
|
|
||||||
HasPerformanceSessions = true
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
EndGlobal
|
||||||
@@ -157,10 +157,10 @@ namespace Vocaluxe.Base
|
|||||||
switch (_SongSorting)
|
switch (_SongSorting)
|
||||||
{
|
{
|
||||||
case ESongSorting.TR_CONFIG_EDITION:
|
case ESongSorting.TR_CONFIG_EDITION:
|
||||||
fieldName = "Edition";
|
fieldName = "Editions";
|
||||||
break;
|
break;
|
||||||
case ESongSorting.TR_CONFIG_GENRE:
|
case ESongSorting.TR_CONFIG_GENRE:
|
||||||
fieldName = "Genre";
|
fieldName = "Genres";
|
||||||
break;
|
break;
|
||||||
case ESongSorting.TR_CONFIG_FOLDER:
|
case ESongSorting.TR_CONFIG_FOLDER:
|
||||||
fieldName = "FolderName";
|
fieldName = "FolderName";
|
||||||
@@ -177,7 +177,7 @@ namespace Vocaluxe.Base
|
|||||||
fieldName = "Year";
|
fieldName = "Year";
|
||||||
break;
|
break;
|
||||||
case ESongSorting.TR_CONFIG_LANGUAGE:
|
case ESongSorting.TR_CONFIG_LANGUAGE:
|
||||||
fieldName = "Language";
|
fieldName = "Languages";
|
||||||
break;
|
break;
|
||||||
case ESongSorting.TR_CONFIG_DATEADDED:
|
case ESongSorting.TR_CONFIG_DATEADDED:
|
||||||
fieldName = "DateAdded";
|
fieldName = "DateAdded";
|
||||||
|
|||||||
@@ -117,6 +117,9 @@ namespace VocaluxeLib.Songs
|
|||||||
public string TitleSorting = String.Empty;
|
public string TitleSorting = String.Empty;
|
||||||
public string ArtistSorting = String.Empty;
|
public string ArtistSorting = String.Empty;
|
||||||
|
|
||||||
|
public string Creator = "";
|
||||||
|
public string Version = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Start of the song in s (s in txt)
|
/// Start of the song in s (s in txt)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -148,7 +151,7 @@ namespace VocaluxeLib.Songs
|
|||||||
get { return Notes.VoiceCount > 1; }
|
get { return Notes.VoiceCount > 1; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public readonly List<string> Edition = new List<string>();
|
public readonly List<string> Editions = new List<string>();
|
||||||
public readonly List<string> Genres = new List<string>();
|
public readonly List<string> Genres = new List<string>();
|
||||||
public string Year = "";
|
public string Year = "";
|
||||||
|
|
||||||
@@ -227,7 +230,7 @@ namespace VocaluxeLib.Songs
|
|||||||
_CatIndex = song._CatIndex;
|
_CatIndex = song._CatIndex;
|
||||||
_Selected = song._Selected;
|
_Selected = song._Selected;
|
||||||
|
|
||||||
Edition = new List<string>(song.Edition);
|
Editions = new List<string>(song.Editions);
|
||||||
|
|
||||||
Genres = new List<string>(song.Genres);
|
Genres = new List<string>(song.Genres);
|
||||||
|
|
||||||
|
|||||||
@@ -109,6 +109,8 @@ namespace VocaluxeLib.Songs
|
|||||||
if (pos <= 1)
|
if (pos <= 1)
|
||||||
continue;
|
continue;
|
||||||
string identifier = line.Substring(1, pos - 1).Trim().ToUpper();
|
string identifier = line.Substring(1, pos - 1).Trim().ToUpper();
|
||||||
|
if (identifier.Contains(" "))
|
||||||
|
continue;
|
||||||
string value = line.Substring(pos + 1).Trim();
|
string value = line.Substring(pos + 1).Trim();
|
||||||
|
|
||||||
if (value == "")
|
if (value == "")
|
||||||
@@ -147,6 +149,12 @@ namespace VocaluxeLib.Songs
|
|||||||
case "ARTIST-ON-SORTING":
|
case "ARTIST-ON-SORTING":
|
||||||
_Song.ArtistSorting = value;
|
_Song.ArtistSorting = value;
|
||||||
break;
|
break;
|
||||||
|
case "CREATOR":
|
||||||
|
_Song.Creator = value;
|
||||||
|
break;
|
||||||
|
case "VERSION":
|
||||||
|
_Song.Version = value;
|
||||||
|
break;
|
||||||
case "MP3":
|
case "MP3":
|
||||||
if (File.Exists(Path.Combine(_Song.Folder, value)))
|
if (File.Exists(Path.Combine(_Song.Folder, value)))
|
||||||
{
|
{
|
||||||
@@ -170,7 +178,7 @@ namespace VocaluxeLib.Songs
|
|||||||
break;
|
break;
|
||||||
case "EDITION":
|
case "EDITION":
|
||||||
if (value.Length > 1)
|
if (value.Length > 1)
|
||||||
_Song.Edition.Add(value);
|
_Song.Editions.Add(value);
|
||||||
else
|
else
|
||||||
_LogWarning("Invalid edition");
|
_LogWarning("Invalid edition");
|
||||||
break;
|
break;
|
||||||
@@ -276,7 +284,7 @@ namespace VocaluxeLib.Songs
|
|||||||
if (value.ToUpper() == "YES")
|
if (value.ToUpper() == "YES")
|
||||||
_Song.Relative = true;
|
_Song.Relative = true;
|
||||||
break;
|
break;
|
||||||
case "RESULTION":
|
case "RESOULTION":
|
||||||
_LogWarning("#RESOLUTION tag is outdated and ignored. Test the song to see if note timing is still correct!");
|
_LogWarning("#RESOLUTION tag is outdated and ignored. Test the song to see if note timing is still correct!");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -291,6 +299,8 @@ namespace VocaluxeLib.Songs
|
|||||||
_Song.Notes.VoiceNames[curPlayer] = value;
|
_Song.Notes.VoiceNames[curPlayer] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
_LogWarning("Unknown tag: #" + identifier);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,23 +31,29 @@ namespace VocaluxeLib.Songs
|
|||||||
|
|
||||||
private void _WriteHeaderEntry<T>(StreamWriter sw, string id, IList<T> value)
|
private void _WriteHeaderEntry<T>(StreamWriter sw, string id, IList<T> value)
|
||||||
{
|
{
|
||||||
if (value!=null && value.Count>0)
|
if (value != null && value.Count > 0)
|
||||||
foreach (var val in value)
|
{
|
||||||
|
foreach (T val in value)
|
||||||
_WriteHeaderEntry(sw, id, val);
|
_WriteHeaderEntry(sw, id, val);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _WriteHeader(StreamWriter sw)
|
private void _WriteHeader(StreamWriter sw)
|
||||||
{
|
{
|
||||||
_WriteHeaderEntry(sw, "ENCODING", _Song.Encoding);
|
_WriteHeaderEntry(sw, "ENCODING", _Song.Encoding);
|
||||||
|
_WriteHeaderEntry(sw, "CREATOR", _Song.Creator);
|
||||||
|
_WriteHeaderEntry(sw, "VERSION", _Song.Version);
|
||||||
|
_WriteHeaderEntry(sw, "COMMENT", _Song._Comment);
|
||||||
_WriteHeaderEntry(sw, "TITLE", _Song.Title);
|
_WriteHeaderEntry(sw, "TITLE", _Song.Title);
|
||||||
_WriteHeaderEntry(sw, "ARTIST", _Song.Artist);
|
_WriteHeaderEntry(sw, "ARTIST", _Song.Artist);
|
||||||
if (!_Song.Title.Equals(_Song.TitleSorting)) _WriteHeaderEntry(sw, "TITLE-ON-SORTING", _Song.TitleSorting);
|
if (!_Song.Title.Equals(_Song.TitleSorting))
|
||||||
if (!_Song.Artist.Equals(_Song.ArtistSorting)) _WriteHeaderEntry(sw, "ARTIST-ON-SORTING", _Song.ArtistSorting);
|
_WriteHeaderEntry(sw, "TITLE-ON-SORTING", _Song.TitleSorting);
|
||||||
_WriteHeaderEntry(sw, "LANGUAGE", _Song.Languages);
|
if (!_Song.Artist.Equals(_Song.ArtistSorting))
|
||||||
_WriteHeaderEntry(sw, "EDITION", _Song.Edition);
|
_WriteHeaderEntry(sw, "ARTIST-ON-SORTING", _Song.ArtistSorting);
|
||||||
|
_WriteHeaderEntry(sw, "EDITION", _Song.Editions);
|
||||||
_WriteHeaderEntry(sw, "GENRE", _Song.Genres);
|
_WriteHeaderEntry(sw, "GENRE", _Song.Genres);
|
||||||
|
_WriteHeaderEntry(sw, "LANGUAGE", _Song.Languages);
|
||||||
_WriteHeaderEntry(sw, "YEAR", _Song.Year);
|
_WriteHeaderEntry(sw, "YEAR", _Song.Year);
|
||||||
_WriteHeaderEntry(sw, "COMMENT", _Song._Comment);
|
|
||||||
_WriteHeaderEntry(sw, "MP3", _Song.MP3FileName);
|
_WriteHeaderEntry(sw, "MP3", _Song.MP3FileName);
|
||||||
_WriteHeaderEntry(sw, "COVER", _Song.CoverFileName);
|
_WriteHeaderEntry(sw, "COVER", _Song.CoverFileName);
|
||||||
_WriteHeaderEntry(sw, "BACKGROUND", _Song.BackgroundFileName);
|
_WriteHeaderEntry(sw, "BACKGROUND", _Song.BackgroundFileName);
|
||||||
@@ -60,7 +66,7 @@ namespace VocaluxeLib.Songs
|
|||||||
_WriteHeaderEntry(sw, "PREVIEWSTART", _Song.PreviewStart);
|
_WriteHeaderEntry(sw, "PREVIEWSTART", _Song.PreviewStart);
|
||||||
_WriteHeaderEntry(sw, "START", _Song.Start);
|
_WriteHeaderEntry(sw, "START", _Song.Start);
|
||||||
_WriteHeaderEntry(sw, "END", _Song.Finish);
|
_WriteHeaderEntry(sw, "END", _Song.Finish);
|
||||||
if(!_Song.CalculateMedley)
|
if (!_Song.CalculateMedley)
|
||||||
_WriteHeaderEntry(sw, "CALCMEDLEY", "OFF");
|
_WriteHeaderEntry(sw, "CALCMEDLEY", "OFF");
|
||||||
if (_Song.Medley.Source == EMedleySource.Tag)
|
if (_Song.Medley.Source == EMedleySource.Tag)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user