mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-23 15:06:53 +00:00
Added codec of the attached file
This commit is contained in:
parent
8325294e65
commit
e8895b1752
@ -65,6 +65,7 @@ class YoutubeBridge extends BridgeAbstract{
|
||||
$item->uri = 'https://www.youtube.com'.$element->find('a',0)->href;
|
||||
$item->thumbnailUri = 'https:'.$element->find('img',0)->src;
|
||||
$item->attachment = htmlspecialchars($video);
|
||||
$item->attachmentCodec = "video/mp4";
|
||||
$item->title = trim($element->find('h3',0)->plaintext);
|
||||
$item->content = '<a href="' . $item->uri . '"><img src="' . $item->thumbnailUri . '" /></a><br><a href="' . $item->uri . '">' . $item->title . '</a>';
|
||||
$this->items[] = $item;
|
||||
|
@ -26,6 +26,7 @@ class AtomFormat extends FormatAbstract{
|
||||
$entryTitle = is_null($data->title) ? '' : $data->title;
|
||||
$entryUri = is_null($data->uri) ? '' : $data->uri;
|
||||
$entryAttachment = is_null($data->attachment) ? '' : $data->attachment;
|
||||
$entryAttachmentCodec = is_null($data->attachmentCodec) ? '' : $data->attachmentCodec;
|
||||
$entryTimestamp = is_null($data->timestamp) ? date(DATE_ATOM, 0) : date(DATE_ATOM, $data->timestamp);
|
||||
$timestamps[] = (int)$entryTimestamp;
|
||||
// We prevent content from closing the CDATA too early.
|
||||
@ -43,7 +44,7 @@ class AtomFormat extends FormatAbstract{
|
||||
<id>{$entryUri}</id>
|
||||
<updated>{$entryTimestamp}</updated>
|
||||
<content type="html">{$entryContent}</content>
|
||||
<link rel="enclosure" href="{$entryAttachment}" />
|
||||
<link rel="enclosure" href="{$entryAttachment}" type="{$entryAttachmentCodec}" />
|
||||
</entry>
|
||||
|
||||
EOD;
|
||||
|
Loading…
Reference in New Issue
Block a user