示例#1
0
bool CPVRRecordings::DeleteRecording(const CFileItem &item)
{
  if (!item.IsPVRRecording())
  {
    CLog::Log(LOGERROR, "CPVRRecordings - %s - cannot delete file: no valid recording tag", __FUNCTION__);
    return false;
  }

  CPVRRecording *tag = (CPVRRecording *)item.GetPVRRecordingInfoTag();
  return tag->Delete();
}
示例#2
0
文件: PVRFile.cpp 项目: RoboSK/xbmc
bool CPVRFile::Delete(const CURL& url)
{
  CStdString path(url.GetFileName());

  if (path.Left(11) == "recordings/" && path[path.size()-1] != '/')
  {
    CStdString strURL = url.Get();
    CPVRRecording *tag = CPVRManager::GetRecordings()->GetByPath(strURL);
    if (tag)
      return tag->Delete();
  }
  return false;
}