From 2f114ef7ccc8642db989e3d78bc68c3f55a66ac2 Mon Sep 17 00:00:00 2001 From: montellese Date: Thu, 5 Feb 2015 20:33:10 +0100 Subject: [PATCH] CGUIWindowSlideShow: use CGUIViewStateWindowPictures::GetExtensions() as a fallback if no file extensions were specified in RunSlideshow() --- xbmc/pictures/GUIWindowSlideShow.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xbmc/pictures/GUIWindowSlideShow.cpp b/xbmc/pictures/GUIWindowSlideShow.cpp index 0ce46565fc265..4bffed30ebf51 100644 --- a/xbmc/pictures/GUIWindowSlideShow.cpp +++ b/xbmc/pictures/GUIWindowSlideShow.cpp @@ -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" @@ -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);