|
From: Tapio V. <aa...@us...> - 2011-01-28 10:03:54
|
Module: editor
Branch: master
Commit: 913285a67b45ad0b76ea869fe452e9cd9502bd8d
Author: Tapio Vierros <tap...@gm...>
Date: Fri Jan 28 12:00:58 2011 +0200
Use "Rap" attribute if "Lyric" is empty in SingStar XML parser.
---
songparser-xml.cc | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/songparser-xml.cc b/songparser-xml.cc
index 14a3039..e22d815 100644
--- a/songparser-xml.cc
+++ b/songparser-xml.cc
@@ -63,9 +63,11 @@ void SongParser::xmlParse()
unsigned int ts = m_prevts;
// See if it is an actual note and not sleep
- if (noteElem.attribute("MidiNote") != "0" || !noteElem.attribute("Lyric").isEmpty()) {
+ QString lyric = noteElem.attribute("Lyric").isEmpty()
+ ? noteElem.attribute("Rap") : noteElem.attribute("Lyric");
+ if (noteElem.attribute("MidiNote") != "0" || !lyric.isEmpty()) {
// TODO: Prettify lyric? (as ss_extract)
- Note n(noteElem.attribute("Lyric"));
+ Note n(lyric);
if (noteElem.attribute("Bonus") == QString("Yes"))
n.type = Note::GOLDEN;
else if (noteElem.attribute("FreeStyle") == QString("Yes"))
|