1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 15:25:59 +00:00

Store size of enclosure to database

This commit is contained in:
Felix Eckhofer
2014-07-15 15:32:28 +02:00
parent 06c4c9ebae
commit 523bd90baf
4 changed files with 21 additions and 3 deletions

View File

@@ -145,6 +145,8 @@ class FeedItem_Atom extends FeedItem_Common {
$enc->type = $enclosure->getAttribute("type");
$enc->link = $enclosure->getAttribute("url");
$enc->length = $enclosure->getAttribute("length");
$enc->height = $enclosure->getAttribute("height");
$enc->width = $enclosure->getAttribute("width");
$desc = $this->xpath->query("media:description", $enclosure)->item(0);
if ($desc) $enc->title = strip_tags($desc->nodeValue);
@@ -164,6 +166,8 @@ class FeedItem_Atom extends FeedItem_Common {
$enc->type = $content->getAttribute("type");
$enc->link = $content->getAttribute("url");
$enc->length = $content->getAttribute("length");
$enc->height = $content->getAttribute("height");
$enc->width = $content->getAttribute("width");
$desc = $this->xpath->query("media:description", $content)->item(0);
if ($desc) {
@@ -184,6 +188,8 @@ class FeedItem_Atom extends FeedItem_Common {
$enc->type = "image/generic";
$enc->link = $enclosure->getAttribute("url");
$enc->height = $enclosure->getAttribute("height");
$enc->width = $enclosure->getAttribute("width");
array_push($encs, $enc);
}