diff options
| author | Omar Roth <omarroth@hotmail.com> | 2019-03-01 10:44:41 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2019-03-01 10:44:41 -0600 |
| commit | 2fe545e19a9e3669b5c4b7b5c53e559afb864341 (patch) | |
| tree | 6cf4c713636aa4ac51ee3fe3408fa55ea738758e | |
| parent | ea52c05f0505cd0881766dd1ef3efbae4a892d89 (diff) | |
| download | invidious-2fe545e19a9e3669b5c4b7b5c53e559afb864341.tar.gz invidious-2fe545e19a9e3669b5c4b7b5c53e559afb864341.tar.bz2 invidious-2fe545e19a9e3669b5c4b7b5c53e559afb864341.zip | |
Add content element to RSS feeds
| -rw-r--r-- | src/invidious.cr | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index e4712d5d..e6e8340b 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -2020,6 +2020,14 @@ get "/feed/channel/:ucid" do |env| end end + xml.element("content", type: "xhtml") do + xml.element("div", xmlns: "http://www.w3.org/1999/xhtml") do + xml.element("a", href: "#{host_url}/watch?v=#{video.id}") do + xml.element("img", src: "#{host_url}/vi/#{video.id}/mqdefault.jpg") + end + end + end + xml.element("published") { xml.text video.published.to_s("%Y-%m-%dT%H:%M:%S%:z") } xml.element("media:group") do @@ -2135,6 +2143,14 @@ get "/feed/private" do |env| xml.element("uri") { xml.text "#{host_url}/channel/#{video.ucid}" } end + xml.element("content", type: "xhtml") do + xml.element("div", xmlns: "http://www.w3.org/1999/xhtml") do + xml.element("a", href: "#{host_url}/watch?v=#{video.id}") do + xml.element("img", src: "#{host_url}/vi/#{video.id}/mqdefault.jpg") + end + end + end + xml.element("published") { xml.text video.published.to_s("%Y-%m-%dT%H:%M:%S%:z") } xml.element("updated") { xml.text video.updated.to_s("%Y-%m-%dT%H:%M:%S%:z") } |
