aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmarshallnz <jcmarsha@gmail.com>2014-08-01 08:18:17 +1200
committerjmarshallnz <jcmarsha@gmail.com>2014-08-01 08:18:17 +1200
commit0faddab77fb40a258a589a22635219b8b2cbb1a4 (patch)
tree56916d2ec96dc6edf26cbc4660715e3498770485
parentb963bade592092b96be45a0a5bd53f930a5bdbf3 (diff)
parentcd7c43672ba750dc296e258be44195ffffc6ef40 (diff)
Merge pull request #5120 from xhaggi/fix-get-timers-directory
[pvr] fix the path split-up in CPVRTimers::GetDirectory() which results in no timer is returned
-rw-r--r--xbmc/pvr/timers/PVRTimers.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/xbmc/pvr/timers/PVRTimers.cpp b/xbmc/pvr/timers/PVRTimers.cpp
index 33f4fc563c..a8dd8ef4f7 100644
--- a/xbmc/pvr/timers/PVRTimers.cpp
+++ b/xbmc/pvr/timers/PVRTimers.cpp
@@ -399,15 +399,12 @@ bool CPVRTimers::HasActiveTimers(void) const
bool CPVRTimers::GetDirectory(const CStdString& strPath, CFileItemList &items) const
{
- CURL url(strPath);
- CStdString fileName = url.GetFileName();
-
- vector<string> dirs = URIUtils::SplitPath(URIUtils::GetDirectory(fileName));
- if(dirs.size() == 2 && dirs.at(0) == "timers")
+ vector<string> dirs = URIUtils::SplitPath(strPath);
+ if(dirs.size() == 3 && dirs.at(1) == "timers")
{
- bool bRadio = (dirs.at(1) == "radio");
- CFileItemPtr item;
+ bool bRadio = (dirs.at(2) == "radio");
+ CFileItemPtr item;
item.reset(new CFileItem("pvr://timers/add.timer", false));
item->SetLabel(g_localizeStrings.Get(19026));
item->SetLabelPreformated(true);