Exemplo n.º 1
0
bool CSourcesDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items)
{
  // break up our path
  // format is:  sources://<type>/
  CURL url(strPath);
  CStdString type(url.GetFileName());
  URIUtils::RemoveSlashAtEnd(type);

  VECSOURCES sources;
  VECSOURCES *sourcesFromType = g_settings.GetSourcesFromType(type);
  if (sourcesFromType)
    sources = *sourcesFromType;
  g_mediaManager.GetRemovableDrives(sources);

  if (sources.empty())
    return false;

  return GetDirectory(sources, items);
}