From b197b5fcb466bc3e1cc95d0d740f214ca1f6d934 Mon Sep 17 00:00:00 2001 From: Alexander Eckart Date: Sun, 24 Jun 2012 21:58:57 +0200 Subject: [PATCH] read relative tag, log error and skip file --- Vocaluxe/Lib/Song/CSong.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Vocaluxe/Lib/Song/CSong.cs b/Vocaluxe/Lib/Song/CSong.cs index eefcbbc7..120efbf6 100644 --- a/Vocaluxe/Lib/Song/CSong.cs +++ b/Vocaluxe/Lib/Song/CSong.cs @@ -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;