Ejemplo n.º 1
0
void CLocalBrowseWindowState::SetCurrentPath(const CStdString& path)
{
  // Return current path under assumption that Local browse screen has only one source
  SourcesMap mapSources = m_sourceController.GetSources();

  if (CUtil::IsBlurayFolder(path))
    UpdateHistory();

  if (!mapSources.empty())
  {
    CBrowseWindowSource* firstSource = mapSources.begin()->second;
    if (firstSource)
    {
      firstSource->SetBasePath(path);
    }
    else
    {
      CLog::Log(LOGWARNING, "CLocalBrowseWindowState::SetCurrentPath - first source is null (browse)");
    }
  }
  else
  {
    CLog::Log(LOGWARNING, "CLocalBrowseWindowState::SetCurrentPath - no sources found (browse)");
  }
}
Ejemplo n.º 2
0
CStdString CLocalBrowseWindowState::GetCurrentPath()
{
  // Return current path under assumption that Local browse screen has only one source
  SourcesMap mapSources = m_sourceController.GetSources();

  if (!mapSources.empty())
  {
    CBrowseWindowSource* firstSource = mapSources.begin()->second;
    if (firstSource)
    {
      return firstSource->GetBasePath();
    }
    else
    {
      CLog::Log(LOGWARNING, "CLocalBrowseWindowState::GetCurrentPath - first source is null (browse)");
    }
  }
  else
  {
    CLog::Log(LOGWARNING, "CLocalBrowseWindowState::GetCurrentPath - no sources found (browse)");
  }

  return "";
}