read relative tag, log error and skip file

This commit is contained in:
Alexander Eckart committed 2012-06-24 21:58:57 +02:00
1 parent d1d2593946
commit b197b5fcb4
1 file changed
+13 -1
+13 -1
View File
@@ -65,6 +65,7 @@ namespace Vocaluxe.Lib.Song
public string Folder = String.Empty;
public string FolderName = String.Empty;
public string FileName = String.Empty;
public EOffOn Relative = EOffOn.TR_CONFIG_OFF;
public string MP3FileName = String.Empty;
public string CoverFileName = String.Empty;
@@ -172,6 +173,7 @@ namespace Vocaluxe.Lib.Song
this.Folder = song.Folder;
this.FolderName = song.FolderName;
this.FileName = song.FileName;
this.Relative = song.Relative;
this.MP3FileName = song.MP3FileName;
this.CoverFileName = song.CoverFileName;
@@ -454,6 +456,10 @@ namespace Vocaluxe.Lib.Song
if (Value.ToUpper() == "OFF")
this.CalculateMedley = false;
break;
case "RELATIVE":
if (Value.ToUpper() == "YES" && Value.ToUpper() != "NO")
this.Relative = EOffOn.TR_CONFIG_ON;
break;
default:
;
break;
@@ -493,6 +499,12 @@ namespace Vocaluxe.Lib.Song
return false;
}
if (this.Relative == EOffOn.TR_CONFIG_ON)
{
CLog.LogError("Relative songs are not supported by Vocaluxe (perhaps later)! (" + FilePath + ")");
return false;
}
#region check medley tags
if ((HeaderFlags & EHeaderFlags.MedleyStartBeat) != 0 && (HeaderFlags & EHeaderFlags.MedleyEndBeat) != 0)
{
@@ -658,7 +670,7 @@ namespace Vocaluxe.Lib.Song
char chr = (char)sr.Read();
Param1 = CHelper.TryReadInt(sr);
NewSentence(Player, Param1);
isNewSentence = true;