Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

pvr: added .pvr match in URIUtils::IsLiveTV(). added URIUtils::IsPVRR…

…ecording()
  • Loading branch information...
commit 18810b030dfde847d03bcb31349282dbf543d517 1 parent d2c1bfb
Lars Op den Kamp authored
Showing with 15 additions and 1 deletion.
  1. +14 −1 xbmc/utils/URIUtils.cpp
  2. +1 −0  xbmc/utils/URIUtils.h
15 xbmc/utils/URIUtils.cpp
View
@@ -727,12 +727,16 @@ bool URIUtils::IsHTSP(const CStdString& strFile)
bool URIUtils::IsLiveTV(const CStdString& strFile)
{
+ CStdString strFileWithoutSlash(strFile);
+ RemoveSlashAtEnd(strFileWithoutSlash);
+
if(IsTuxBox(strFile)
|| IsVTP(strFile)
|| IsHDHomeRun(strFile)
|| IsSlingbox(strFile)
|| IsHTSP(strFile)
- || strFile.Left(4).Equals("sap:"))
+ || strFile.Left(4).Equals("sap:")
+ ||(strFileWithoutSlash.Right(4).Equals(".pvr") && !IsPVRRecording(strFile)))
return true;
if (IsMythTV(strFile) && CMythDirectory::IsLiveTV(strFile))
@@ -741,6 +745,15 @@ bool URIUtils::IsLiveTV(const CStdString& strFile)
return false;
}
+bool URIUtils::IsPVRRecording(const CStdString& strFile)
+{
+ CStdString strFileWithoutSlash(strFile);
+ RemoveSlashAtEnd(strFileWithoutSlash);
+
+ return strFileWithoutSlash.Right(4).Equals(".pvr") &&
+ strFile.Left(16).Equals("pvr://recordings");
+}
+
bool URIUtils::IsMusicDb(const CStdString& strFile)
{
return strFile.Left(8).Equals("musicdb:");
1  xbmc/utils/URIUtils.h
View
@@ -68,6 +68,7 @@ class URIUtils
static bool IsISO9660(const CStdString& strFile);
static bool IsLastFM(const CStdString& strFile);
static bool IsLiveTV(const CStdString& strFile);
+ static bool IsPVRRecording(const CStdString& strFile);
static bool IsMultiPath(const CStdString& strPath);
static bool IsMusicDb(const CStdString& strFile);
static bool IsMythTV(const CStdString& strFile);
Please sign in to comment.
Something went wrong with that request. Please try again.