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 "GUIWindowPVRTimerRules.h"
12 #include "FileItemList.h"
13 #include "pvr/timers/PVRTimersPath.h"
14 #include "utils/URIUtils.h"
18 CGUIWindowPVRTVTimerRules::CGUIWindowPVRTVTimerRules()
19 : CGUIWindowPVRTimersBase(false, WINDOW_TV_TIMER_RULES
, "MyPVRTimers.xml")
23 std::string
CGUIWindowPVRTVTimerRules::GetRootPath() const
25 return CPVRTimersPath::PATH_TV_TIMER_RULES
;
28 std::string
CGUIWindowPVRTVTimerRules::GetDirectoryPath()
30 const std::string
basePath(CPVRTimersPath(false, true).GetPath());
31 return URIUtils::PathHasParent(m_vecItems
->GetPath(), basePath
) ? m_vecItems
->GetPath() : basePath
;
34 CGUIWindowPVRRadioTimerRules::CGUIWindowPVRRadioTimerRules()
35 : CGUIWindowPVRTimersBase(true, WINDOW_RADIO_TIMER_RULES
, "MyPVRTimers.xml")
39 std::string
CGUIWindowPVRRadioTimerRules::GetRootPath() const
41 return CPVRTimersPath::PATH_RADIO_TIMER_RULES
;
44 std::string
CGUIWindowPVRRadioTimerRules::GetDirectoryPath()
46 const std::string
basePath(CPVRTimersPath(true, true).GetPath());
47 return URIUtils::PathHasParent(m_vecItems
->GetPath(), basePath
) ? m_vecItems
->GetPath() : basePath
;