Commit 6eb13167 authored by Bart De Vries's avatar Bart De Vries
Browse files

Fix bug with feeds with multiple enclosures per entry

BUG: 440389
parent 00be5e38
Pipeline #72438 passed with stage
in 8 minutes and 17 seconds
......@@ -344,7 +344,10 @@ void Fetcher::processEnclosure(Syndication::EnclosurePtr enclosure, Syndication:
query.next();
if (query.value(0).toInt() != 0)
query.prepare(QStringLiteral("UPDATE Enclosures SET feed=:feed, id=:id, duration=:duration, size=:size, title=:title, type=:type, url=:url;"));
query.prepare(QStringLiteral(
"UPDATE Enclosures SET feed=:feed, id=:id, duration=:duration, size=:size, title=:title, type=:type, url=:url WHERE feed=:feed AND id=:id;"));
// NOTE: In case more than one enclosure is present per episode, only
// the last one will end up in the database
else
query.prepare(QStringLiteral("INSERT INTO Enclosures VALUES (:feed, :id, :duration, :size, :title, :type, :url, :playposition, :downloaded);"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment