don't subst stuff that already has translits

This commit is contained in:
Glenn Maynard
2003-02-12 20:21:03 +00:00
parent 2fd80d6551
commit 2f2447cb31
+5 -4
View File
@@ -46,20 +46,21 @@ void TitleSubst::Subst(CString &title, CString &subtitle, CString &artist,
if(!ttab[i]->Matches(title, subtitle, artist))
continue;
/* The song matches. Replace whichever strings aren't empty: */
if(!ttab[i]->TitleTo.empty())
/* The song matches. Replace whichever strings aren't empty.
* Don't replace any that already have a transliteration set. */
if(!ttab[i]->TitleTo.empty() && ttitle.empty())
{
if(ttab[i]->translit) ttitle = title;
title = ttab[i]->TitleTo;
FontCharAliases::ReplaceMarkers( title );
}
if(!ttab[i]->SubTo.empty())
if(!ttab[i]->SubTo.empty() && tsubtitle.empty())
{
if(ttab[i]->translit) tsubtitle = subtitle;
subtitle = ttab[i]->SubTo;
FontCharAliases::ReplaceMarkers( subtitle );
}
if(!ttab[i]->ArtistTo.empty())
if(!ttab[i]->ArtistTo.empty() && tartist.empty())
{
if(ttab[i]->translit) tartist = artist;
artist = ttab[i]->ArtistTo;