bool MythProgramInfo::IsVisible() { // Filter out recording of special storage groups (like LiveTV or Deleted) // When deleting a recording, it might not be deleted immediately but marked as 'pending delete'. // Depending on the protocol version the recording is moved to the group Deleted or // the 'delete pending' flag is set if (RecordingGroup() == "LiveTV" || RecordingGroup() == "Deleted" || IsDeletePending()) { return false; } return true; }
bool MythProgramInfo::IsSetup() const { if (m_flags) return true; m_flags |= FLAGS_INITIALIZED; if (m_proginfo) { // Has Artworks ? for (std::vector<Myth::Artwork>::const_iterator it = m_proginfo->artwork.begin(); it != m_proginfo->artwork.end(); ++it) { if (it->type == "coverart") m_flags |= FLAGS_HAS_COVERART; else if (it->type == "fanart") m_flags |= FLAGS_HAS_FANART; else if (it->type == "banner") m_flags |= FLAGS_HAS_BANNER; } // Is Visible ? // Filter out recording of special storage group Deleted // Filter out recording with duration less than 5 seconds // When deleting a recording, it might not be deleted immediately but marked as 'pending delete'. // Depending on the protocol version the recording is moved to the group Deleted or // the 'delete pending' flag is set if (Duration() >= 5) { if (RecordingGroup() == "Deleted" || IsDeletePending()) m_flags |= FLAGS_IS_DELETED; else m_flags |= FLAGS_IS_VISIBLE; } // Is LiveTV ? if (RecordingGroup() == "LiveTV") m_flags |= FLAGS_IS_LIVETV; } return true; }