Songs can be in any of the following formats:

*
song
group/*
group/song
If we read in "song" don't write out "group/song". If we read in "group/song" make sure we set the course entry's group name.
This commit is contained in:
Steve Checkoway
2006-03-12 09:10:31 +00:00
parent 3511392d6d
commit 3481196347
2 changed files with 19 additions and 11 deletions
+6 -8
View File
@@ -102,14 +102,12 @@ bool CourseWriterCRS::Write( const Course &course, RageFileBasic &f, bool bSavin
}
else if( entry.pSong )
{
// strip off everything but the group name and song dir
vector<RString> as;
ASSERT( entry.pSong != NULL );
split( entry.pSong->GetSongDir(), "/", as );
ASSERT( as.size() >= 2 );
RString sGroup = as[ as.size()-2 ];
RString sSong = as[ as.size()-1 ];
f.Write( "#SONG:" + sGroup + '/' + sSong );
const RString &sSong = Basename( entry.pSong->GetSongDir() );
f.Write( "#SONG:" );
if( !entry.sSongGroup.empty() )
f.Write( entry.sSongGroup + '/' );
f.Write( sSong );
}
else if( !entry.sSongGroup.empty() )
{