Do not process "other" fields before checking if entry already exists

This commit is contained in:
Bart De Vries 2022-04-28 11:14:05 +02:00
parent 82112a0c47
commit cb9000faa5
1 changed files with 8 additions and 8 deletions

View File

@ -221,14 +221,6 @@ bool UpdateFeedJob::processEntry(Syndication::ItemPtr entry)
{
qCDebug(kastsFetcher) << "Processing" << entry->title();
// Retrieve "other" fields; this will include the "itunes" tags
QMultiMap<QString, QDomElement> otherItems = entry->additionalProperties();
for (QString key : otherItems.uniqueKeys()) {
qCDebug(kastsFetcher) << "other elements";
qCDebug(kastsFetcher) << key << otherItems.value(key).tagName();
}
// check against existing entries in database
if (m_existingEntryIds.contains(entry->id()))
return false;
@ -239,6 +231,14 @@ bool UpdateFeedJob::processEntry(Syndication::ItemPtr entry)
return false; // entry already exists
}
// Retrieve "other" fields; this will include the "itunes" tags
QMultiMap<QString, QDomElement> otherItems = entry->additionalProperties();
for (QString key : otherItems.uniqueKeys()) {
qCDebug(kastsFetcher) << "other elements";
qCDebug(kastsFetcher) << key << otherItems.value(key).tagName();
}
EntryDetails entryDetails;
entryDetails.feed = m_url;
entryDetails.id = entry->id();