void RecordingSelector::getRecordingList(void) { ProgramInfo *p; m_recordingList = RemoteGetRecordedList(-1); m_categories.clear(); if (m_recordingList && !m_recordingList->empty()) { vector<ProgramInfo *>::iterator i = m_recordingList->begin(); for ( ; i != m_recordingList->end(); ++i) { p = *i; // ignore live tv and deleted recordings if (p->GetRecordingGroup() == "LiveTV" || p->GetRecordingGroup() == "Deleted") { i = m_recordingList->erase(i); --i; continue; } if (m_categories.indexOf(p->GetTitle()) == -1) m_categories.append(p->GetTitle()); } } }
void RecordingSelector::getRecordingList(void) { ProgramInfo *p; m_recordingList = RemoteGetRecordedList(true); m_categories.clear(); if (m_recordingList && m_recordingList->size() > 0) { vector<ProgramInfo *>::iterator i = m_recordingList->begin(); for ( ; i != m_recordingList->end(); i++) { p = *i; // we can't handle recordings that have to be streamed to us if (p->GetPlaybackURL(false, true).startsWith("myth://")) { VERBOSE(VB_FILE, QString("MythArchive cannot handle this file because it isn't available locally - %1") .arg(p->GetPlaybackURL(false, true))); i = m_recordingList->erase(i); i--; continue; } // ignore live tv and deleted recordings if (p->GetRecordingGroup() == "LiveTV" || p->GetRecordingGroup() == "Deleted") { i = m_recordingList->erase(i); i--; continue; } if (m_categories.indexOf(p->GetTitle()) == -1) m_categories.append(p->GetTitle()); } } }
void ProgramInfoCache::Load(const bool updateUI) { QMutexLocker locker(&m_lock); m_load_is_queued = false; locker.unlock(); /**/ // Get an unsorted list (sort = 0) from RemoteGetRecordedList // we sort the list later anyway. vector<ProgramInfo*> *tmp = RemoteGetRecordedList(0); /**/ locker.relock(); free_vec(m_next_cache); m_next_cache = tmp; if (updateUI) QCoreApplication::postEvent( m_listener, new MythEvent("UPDATE_UI_LIST")); m_loads_in_progress--; m_load_wait.wakeAll(); }