]> git.wh0rd.org - tt-rss.git/commitdiff
Merge branch 'pullreq-enclosure-content-type' of tkappe/tt-rss into master
authorfox <fox+git@fakecake.org>
Tue, 21 Aug 2018 03:47:39 +0000 (03:47 +0000)
committerGogs <gogs@fake.local>
Tue, 21 Aug 2018 03:47:39 +0000 (03:47 +0000)
classes/rssutils.php

index 554d89f5a63a8c587ac27932c5cc201c78facfd2..5a1a9467c804148eb931b93d4df6fb5e78491da0 100755 (executable)
@@ -1060,7 +1060,7 @@ class RSSUtils {
                                }
 
                                $esth = $pdo->prepare("SELECT id FROM ttrss_enclosures
-                                               WHERE content_url = ? AND post_id = ?");
+                                               WHERE content_url = ? AND content_type = ? AND post_id = ?");
 
                                $usth = $pdo->prepare("INSERT INTO ttrss_enclosures
                                                        (content_url, content_type, title, duration, post_id, width, height) VALUES
@@ -1074,7 +1074,7 @@ class RSSUtils {
                                        $enc_width = intval($enc[4]);
                                        $enc_height = intval($enc[5]);
 
-                                       $esth->execute([$enc_url, $entry_ref_id]);
+                                       $esth->execute([$enc_url, $enc_type, $entry_ref_id]);
 
                                        if (!$esth->fetch()) {
                                                $usth->execute([$enc_url, $enc_type, (string)$enc_title, $enc_dur, $entry_ref_id, $enc_width, $enc_height]);