Refactor:

It seems to be no big deal to have a lot of small files; I think it's the
actual scan of the song tree that's expensive.  Simplify with this in
mind.

Load song banners when the song is loaded, so we don't load banners
for songs that aren't there.

Avoid touching the original banner when we're simply loading.
This commit is contained in:
Glenn Maynard
2003-06-15 00:57:05 +00:00
parent 17f2a9c906
commit 06af315dfd
4 changed files with 82 additions and 51 deletions
+5 -1
View File
@@ -374,6 +374,10 @@ bool Song::LoadFromSongDir( CString sDir )
return false;
}
/* Load the cached banner, if it's not loaded already. */
if( HasBanner() )
BANNERCACHE->LoadBanner( GetBannerPath() );
{
/* Generated filename; this doesn't always point to a loadable file,
* but instead points to the file we should write changed files to,
@@ -687,7 +691,7 @@ void Song::TidyUpData()
}
if( HasBanner() )
BANNERCACHE->CacheSongBanner( GetBannerPath() );
BANNERCACHE->CacheBanner( GetBannerPath() );
// If no BGChanges are specified and there are movies in the song directory, then assume