Skip to content

Commit

Permalink
factor out the StackingAvailable code
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Marshall committed Jan 26, 2012
1 parent d613807 commit fcf1931
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 8 additions & 3 deletions xbmc/video/windows/GUIWindowVideoBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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/"))
Expand Down
2 changes: 2 additions & 0 deletions xbmc/video/windows/GUIWindowVideoBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit fcf1931

Please sign in to comment.