示例#1
0
bool CPVRChannel::SetLastWatched(time_t iLastWatched)
{
  {
    CSingleLock lock(m_critSection);

    if (m_iLastWatched != iLastWatched)
      m_iLastWatched = iLastWatched;
  }

  const CPVRDatabasePtr database(g_PVRManager.GetTVDatabase());
  if (database)
    return database->UpdateLastWatched(*this);

  return false;
}
示例#2
0
bool CPVRChannelGroup::SetLastWatched(time_t iLastWatched)
{
  const CPVRDatabasePtr database(CServiceBroker::GetPVRManager().GetTVDatabase());

  CSingleLock lock(m_critSection);

  if (m_iLastWatched != iLastWatched)
  {
    m_iLastWatched = iLastWatched;

    /* update the database immediately */
    if (database)
      return database->UpdateLastWatched(*this);
  }

  return false;
}
示例#3
0
bool CPVRChannel::SetLastWatched(time_t iLastWatched)
{
  {
    CSingleLock lock(m_critSection);
    if (m_iLastWatched != iLastWatched)
    {
      m_iLastWatched = iLastWatched;

      const std::shared_ptr<CPVREpg> epg = GetEPG();
      if (epg)
        epg->GetChannelData()->SetLastWatched(iLastWatched);
    }
  }

  const CPVRDatabasePtr database = CServiceBroker::GetPVRManager().GetTVDatabase();
  if (database)
    return database->UpdateLastWatched(*this);

  return false;
}