Exemple #1
0
void Browser::LocateSong(const MPD::Song &s)
{
	if (s.GetDirectory().empty())
		return;
	
	itsBrowseLocally = !s.isFromDB();
	
	if (myScreen != this)
		SwitchTo();
	
	if (itsBrowsedDir != s.GetDirectory())
		GetDirectory(s.GetDirectory());
	for (size_t i = 0; i < w->Size(); ++i)
	{
		if ((*w)[i].type == itSong && s.GetHash() == (*w)[i].song->GetHash())
		{
			w->Highlight(i);
			break;
		}
	}
}