Skip to content

Commit

Permalink
CGUIWindowSlideShow: use CGUIViewStateWindowPictures::GetExtensions()…
Browse files Browse the repository at this point in the history
… as a fallback if no file extensions were specified in RunSlideshow()
  • Loading branch information
Montellese committed Feb 5, 2015
1 parent e867be3 commit 2f114ef
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions xbmc/pictures/GUIWindowSlideShow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#include "utils/log.h"
#include "utils/TimeUtils.h"
#include "interfaces/AnnouncementManager.h"
#include "pictures/GUIViewStatePictures.h"
#include "pictures/PictureInfoTag.h"
#include "pictures/PictureThumbLoader.h"

Expand Down Expand Up @@ -1261,9 +1262,11 @@ void CGUIWindowSlideShow::AddItems(const std::string &strPath, path_set *recursi
recursivePaths->insert(path);
}

// fetch directory and sort accordingly
CFileItemList items;
if (!CDirectory::GetDirectory(strPath, items, m_strExtensions.empty()?g_advancedSettings.m_pictureExtensions:m_strExtensions,DIR_FLAG_NO_FILE_DIRS,true))
CGUIViewStateWindowPictures viewState(items);

// fetch directory and sort accordingly
if (!CDirectory::GetDirectory(strPath, items, viewState.GetExtensions(), DIR_FLAG_NO_FILE_DIRS, true))
return;

items.Sort(method, order, sortAttributes);
Expand Down

0 comments on commit 2f114ef

Please sign in to comment.