Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #4277 from xhaggi/fix-recordings-parent-dir

[pvr] fix: duplicate parent dir item for recordings
  • Loading branch information...
commit 960df5399f13688e7594c6322ed89923f38652dc 2 parents f109a31 + 7ee7e18
@jmarshallnz jmarshallnz authored
View
10 xbmc/pvr/recordings/PVRRecordings.cpp
@@ -224,16 +224,6 @@ void CPVRRecordings::GetSubDirectories(const CStdString &strBase, CFileItemList
}
results->AddFront(pItem, 0);
}
-
- // Add parent directory item
- if (!strUseBase.empty() && (subDirectories > 0 || files.Size() > 0) && CSettings::Get().GetBool("filelists.showparentdiritems"))
- {
- CStdString strLabel("..");
- CFileItemPtr pItem(new CFileItem(strLabel));
- pItem->SetPath("pvr://recordings");
- pItem->m_bIsShareOrDrive = false;
- results->AddFront(pItem, 0);
- }
}
bool CPVRRecordings::HasAllRecordingsPathExtension(const CStdString &strDirectory)
View
5 xbmc/pvr/windows/GUIViewStatePVR.cpp
@@ -65,3 +65,8 @@ void CGUIViewStatePVR::SaveViewState(void)
PVRWindow ActiveView = GetActiveView();
SaveViewToDb(m_items.GetPath(), ActiveView == PVR_WINDOW_UNKNOWN ? WINDOW_PVR : WINDOW_PVR + 100 - ActiveView, NULL);
}
+
+bool CGUIViewStatePVR::HideParentDirItems(void)
+{
+ return (CGUIViewState::HideParentDirItems() || PVR_WINDOW_RECORDINGS != GetActiveView() || m_items.GetPath() == "pvr://recordings/");
+}
View
2  xbmc/pvr/windows/GUIViewStatePVR.h
@@ -33,7 +33,7 @@ namespace PVR
PVRWindow GetActiveView(void);
protected:
bool AutoPlayNextItem(void) { return false; };
- bool HideParentDirItems(void) { return true; }
+ bool HideParentDirItems(void);
void SaveViewState(void);
};
}
View
3  xbmc/pvr/windows/GUIWindowPVRRecordings.cpp
@@ -402,6 +402,9 @@ bool CGUIWindowPVRRecordings::OnContextButtonMarkWatched(const CFileItemPtr &ite
void CGUIWindowPVRRecordings::BeforeUpdate(const CStdString &strDirectory)
{
+ // set items path to current directory
+ m_parent->m_vecItems->SetPath(strDirectory);
+
if (m_thumbLoader.IsLoading())
m_thumbLoader.StopThread();
}
Please sign in to comment.
Something went wrong with that request. Please try again.