diff options
author | jmarshallnz <jcmarsha@gmail.com> | 2014-03-04 20:56:31 +1300 |
---|---|---|
committer | jmarshallnz <jcmarsha@gmail.com> | 2014-03-04 20:56:31 +1300 |
commit | 960df5399f13688e7594c6322ed89923f38652dc (patch) | |
tree | c7fca72ab979e52146805fa6802d13f6da474cf9 | |
parent | f109a31fdaf5ae103446ba9f5d2f9bee43c1b22a (diff) | |
parent | 7ee7e187f2ef726a012baf813b3bb92d3234158c (diff) |
Merge pull request #4277 from xhaggi/fix-recordings-parent-dir
[pvr] fix: duplicate parent dir item for recordings
-rw-r--r-- | xbmc/pvr/recordings/PVRRecordings.cpp | 10 | ||||
-rw-r--r-- | xbmc/pvr/windows/GUIViewStatePVR.cpp | 5 | ||||
-rw-r--r-- | xbmc/pvr/windows/GUIViewStatePVR.h | 2 | ||||
-rw-r--r-- | xbmc/pvr/windows/GUIWindowPVRRecordings.cpp | 3 |
4 files changed, 9 insertions, 11 deletions
diff --git a/xbmc/pvr/recordings/PVRRecordings.cpp b/xbmc/pvr/recordings/PVRRecordings.cpp index 9495064a6b..7859d1681f 100644 --- a/xbmc/pvr/recordings/PVRRecordings.cpp +++ b/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) diff --git a/xbmc/pvr/windows/GUIViewStatePVR.cpp b/xbmc/pvr/windows/GUIViewStatePVR.cpp index 4ffca74880..8fed994df9 100644 --- a/xbmc/pvr/windows/GUIViewStatePVR.cpp +++ b/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/"); +} diff --git a/xbmc/pvr/windows/GUIViewStatePVR.h b/xbmc/pvr/windows/GUIViewStatePVR.h index 8b09b7b094..04060ef2ee 100644 --- a/xbmc/pvr/windows/GUIViewStatePVR.h +++ b/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); }; } diff --git a/xbmc/pvr/windows/GUIWindowPVRRecordings.cpp b/xbmc/pvr/windows/GUIWindowPVRRecordings.cpp index 1c7a69739f..feb39008de 100644 --- a/xbmc/pvr/windows/GUIWindowPVRRecordings.cpp +++ b/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(); } |