Compare commits

..

No commits in common. 'fix-media-player-playlist-limit' and 'main/gingo-test' have entirely different histories.

@ -99,8 +99,6 @@ namespace NLGUI
// Get the number of active children
uint getNumActiveChildren() const;
uint getMaxElements() const { return _MaxElements; }
/**
* set the template that will be used to add text;
* \templ : a CViewText object. Only its font size, color and shadow are required.

@ -158,21 +158,8 @@ bool CMusicPlayer::isShuffleEnabled() const
// ***************************************************************************
void CMusicPlayer::playSongs (const std::vector<std::string> &filenames)
{
CGroupList *pList = dynamic_cast<CGroupList *>(CWidgetManager::getInstance()->getElementFromId(MP3_PLAYER_PLAYLIST_LIST));
if (!pList)
{
nlwarning("MusicPlayer UI not found (%s)", MP3_PLAYER_PLAYLIST_LIST);
return;
}
uint limit = pList->getMaxElements();
if (filenames.size() > limit)
{
CInterfaceManager::getInstance()->displaySystemInfo(toString("Found %u, limit %u", filenames.size(), limit), "SYS");
}
_Songs.clear();
for (uint i = 0; (i < limit) && (i < filenames.size()); i++)
for (uint i=0; i<filenames.size(); i++)
{
_Songs.push_back(CSongs(filenames[i], CFile::getFilename(filenames[i]), 0.f));
}

Loading…
Cancel
Save