fix loading RandomMovies based on song group
This commit is contained in:
@@ -178,14 +178,16 @@ void BackgroundUtil::GetGlobalRandomMovies( const Song *pSong, const CString &sM
|
|||||||
vsPathsOut.clear();
|
vsPathsOut.clear();
|
||||||
vsNamesOut.clear();
|
vsNamesOut.clear();
|
||||||
|
|
||||||
CString sSongGroup;
|
|
||||||
set<CString> ssFilterToFileNames;
|
set<CString> ssFilterToFileNames;
|
||||||
if( pSong && !pSong->m_sGenre.empty() )
|
if( pSong && !pSong->m_sGenre.empty() )
|
||||||
GetFilterToFileNames( RANDOMMOVIES_DIR, pSong, ssFilterToFileNames );
|
GetFilterToFileNames( RANDOMMOVIES_DIR, pSong, ssFilterToFileNames );
|
||||||
|
|
||||||
vector<CString> vsDirsToTry;
|
vector<CString> vsDirsToTry;
|
||||||
if( !sSongGroup.empty() )
|
if( pSong )
|
||||||
vsDirsToTry.push_back( RANDOMMOVIES_DIR+sSongGroup+"/" );
|
{
|
||||||
|
ASSERT( !pSong->m_sGroupName.empty() );
|
||||||
|
vsDirsToTry.push_back( RANDOMMOVIES_DIR+pSong->m_sGroupName+"/" );
|
||||||
|
}
|
||||||
vsDirsToTry.push_back( RANDOMMOVIES_DIR );
|
vsDirsToTry.push_back( RANDOMMOVIES_DIR );
|
||||||
|
|
||||||
FOREACH_CONST( CString, vsDirsToTry, sDir )
|
FOREACH_CONST( CString, vsDirsToTry, sDir )
|
||||||
|
|||||||
Reference in New Issue
Block a user