2 * Copyright (C) 2012-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
9 #include "GUIWindowPVRTimers.h"
12 #include "FileItemList.h"
13 #include "pvr/timers/PVRTimersPath.h"
14 #include "utils/URIUtils.h"
18 CGUIWindowPVRTVTimers::CGUIWindowPVRTVTimers()
19 : CGUIWindowPVRTimersBase(false, WINDOW_TV_TIMERS
, "MyPVRTimers.xml")
23 std::string
CGUIWindowPVRTVTimers::GetRootPath() const
25 return CPVRTimersPath::PATH_TV_TIMERS
;
28 std::string
CGUIWindowPVRTVTimers::GetDirectoryPath()
30 const std::string
basePath(CPVRTimersPath(false, false).GetPath());
31 return URIUtils::PathHasParent(m_vecItems
->GetPath(), basePath
) ? m_vecItems
->GetPath() : basePath
;
34 CGUIWindowPVRRadioTimers::CGUIWindowPVRRadioTimers()
35 : CGUIWindowPVRTimersBase(true, WINDOW_RADIO_TIMERS
, "MyPVRTimers.xml")
39 std::string
CGUIWindowPVRRadioTimers::GetRootPath() const
41 return CPVRTimersPath::PATH_RADIO_TIMERS
;
44 std::string
CGUIWindowPVRRadioTimers::GetDirectoryPath()
46 const std::string
basePath(CPVRTimersPath(true, false).GetPath());
47 return URIUtils::PathHasParent(m_vecItems
->GetPath(), basePath
) ? m_vecItems
->GetPath() : basePath
;