1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 11:45:56 +00:00

parser: add basic support for media:thumbnail

This commit is contained in:
Andrew Dolgov
2013-12-15 12:35:30 +04:00
parent 70fc5a5eab
commit e23aedd402
2 changed files with 22 additions and 0 deletions

View File

@@ -175,6 +175,17 @@ class FeedItem_Atom extends FeedItem_Common {
array_push($encs, $enc);
}
$enclosures = $this->xpath->query("media:thumbnail", $this->elem);
foreach ($enclosures as $enclosure) {
$enc = new FeedEnclosure();
$enc->type = "image/generic";
$enc->link = $enclosure->getAttribute("url");
array_push($encs, $enc);
}
return $encs;
}

View File

@@ -150,6 +150,17 @@ class FeedItem_RSS extends FeedItem_Common {
array_push($encs, $enc);
}
$enclosures = $this->xpath->query("media:thumbnail", $this->elem);
foreach ($enclosures as $enclosure) {
$enc = new FeedEnclosure();
$enc->type = "image/generic";
$enc->link = $enclosure->getAttribute("url");
array_push($encs, $enc);
}
return $encs;
}