diff --git a/src/attica/atticaprovider.cpp b/src/attica/atticaprovider.cpp --- a/src/attica/atticaprovider.cpp +++ b/src/attica/atticaprovider.cpp @@ -273,26 +273,30 @@ EntryInternal::List entries; TagsFilterChecker checker(tagFilter()); TagsFilterChecker downloadschecker(downloadTagFilter()); - Q_FOREACH (const Content &content, contents) { - if (checker.filterAccepts(content.tags())) { - bool filterAcceptsDownloads = true; - if (content.downloads() > 0) { - filterAcceptsDownloads = false; - for (const Attica::DownloadDescription &dli : content.downloadUrlDescriptions()) { - if (downloadschecker.filterAccepts(dli.tags())) { - filterAcceptsDownloads = true; - break; + for (const Content &content : contents) { + if (content.isValid()) { + if (checker.filterAccepts(content.tags())) { + bool filterAcceptsDownloads = true; + if (content.downloads() > 0) { + filterAcceptsDownloads = false; + for (const Attica::DownloadDescription &dli : content.downloadUrlDescriptions()) { + if (downloadschecker.filterAccepts(dli.tags())) { + filterAcceptsDownloads = true; + break; + } } } - } - if (filterAcceptsDownloads) { - mCachedContent.insert(content.id(), content); - entries.append(entryFromAtticaContent(content)); + if (filterAcceptsDownloads) { + mCachedContent.insert(content.id(), content); + entries.append(entryFromAtticaContent(content)); + } else { + qCDebug(KNEWSTUFFCORE) << "Filter has excluded" << content.name() << "on download filter" << downloadTagFilter(); + } } else { - qCDebug(KNEWSTUFFCORE) << "Filter has excluded" << content.name() << "on download filter" << downloadTagFilter(); + qCDebug(KNEWSTUFFCORE) << "Filter has excluded" << content.name() << "on entry filter" << tagFilter(); } } else { - qCDebug(KNEWSTUFFCORE) << "Filter has excluded" << content.name() << "on entry filter" << tagFilter(); + qCDebug(KNEWSTUFFCORE) << "Filtered out an invalid entry. This suggests something is not right on the originating server. Please contact the administrators of" << name() << "and inform them there is an issue with content in the category or categories" << mCurrentRequest.categories; } }