Permalink
Browse files

factor out the StackingAvailable code

  • Loading branch information...
1 parent d613807 commit fcf19317e734dfa11a6a6df33e45dc0aef339d30 Jonathan Marshall committed Jan 26, 2012
Showing with 10 additions and 3 deletions.
  1. +8 −3 xbmc/video/windows/GUIWindowVideoBase.cpp
  2. +2 −0 xbmc/video/windows/GUIWindowVideoBase.h
@@ -1697,9 +1697,7 @@ bool CGUIWindowVideoBase::GetDirectory(const CStdString &strDirectory, CFileItem
items.Add(newPlaylist);
}
- m_stackingAvailable = !(items.IsTuxBox() || items.IsPlugin() ||
- items.IsAddonsPath() || items.IsRSS() ||
- items.IsInternetStream() || items.IsVideoDb());
+ m_stackingAvailable = StackingAvailable(items);
// we may also be in a tvshow files listing
// (ideally this should be removed, and our stack regexps tidied up if necessary
// No "normal" episodes should stack, and multi-parts should be supported)
@@ -1713,6 +1711,13 @@ bool CGUIWindowVideoBase::GetDirectory(const CStdString &strDirectory, CFileItem
return bResult;
}
+bool CGUIWindowVideoBase::StackingAvailable(const CFileItemList &items) const
+{
+ return !(items.IsTuxBox() || items.IsPlugin() ||
+ items.IsAddonsPath() || items.IsRSS() ||
+ items.IsInternetStream() || items.IsVideoDb());
+}
+
void CGUIWindowVideoBase::OnPrepareFileItems(CFileItemList &items)
{
if (!items.GetPath().Equals("plugin://video/"))
@@ -117,6 +117,8 @@ class CGUIWindowVideoBase : public CGUIMediaWindow, public IBackgroundLoaderObse
static bool OnUnAssignContent(const CStdString &path, int label1, int label2, int label3);
+ bool StackingAvailable(const CFileItemList &items) const;
+
CGUIDialogProgress* m_dlgProgress;
CVideoDatabase m_database;

0 comments on commit fcf1931

Please sign in to comment.