mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2026-01-03 00:29:15 +00:00
support media:description for media: enclosures
This commit is contained in:
@@ -3,5 +3,6 @@ class FeedEnclosure {
|
||||
public $link;
|
||||
public $type;
|
||||
public $length;
|
||||
public $title;
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -146,6 +146,9 @@ class FeedItem_Atom extends FeedItem_Common {
|
||||
$enc->link = $enclosure->getAttribute("url");
|
||||
$enc->length = $enclosure->getAttribute("length");
|
||||
|
||||
$desc = $this->xpath->query("media:description", $enclosure)->item(0);
|
||||
if ($desc) $enc->title = strip_tags($desc->nodeValue);
|
||||
|
||||
array_push($encs, $enc);
|
||||
}
|
||||
|
||||
|
||||
@@ -121,6 +121,9 @@ class FeedItem_RSS extends FeedItem_Common {
|
||||
$enc->link = $enclosure->getAttribute("url");
|
||||
$enc->length = $enclosure->getAttribute("length");
|
||||
|
||||
$desc = $this->xpath->query("media:description", $enclosure)->item(0);
|
||||
if ($desc) $enc->title = strip_tags($desc->nodeValue);
|
||||
|
||||
array_push($encs, $enc);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user