tontof / kriss_feed

A simple and smart (or stupid) feed reader
279 stars 52 forks source link

Media-RSS support #416

Closed azmeuk closed 4 years ago

azmeuk commented 4 years ago

Some video platform like Youtube or Peertube use the Media-RSS extension to provide metadata about the videos. They generally do not use the whole tags available, but provide tags for the video description, the thumbnail, and the number of views.

Kriss_feed displays the youtube videos player and description, however the description carriage returns are ignored, and the specification states that <media:description> is plain text by default.

Peertube feeds .torrent files are detected, but the thumbnails are not displayed.

I would love if krissfeed could display the youtube description carriage returns, and the peertube thumbnails.

An extract of a Youtube feed:

  <media:group>
   <media:title>Can You Observe a Typical Universe?</media:title>
   <media:content url="https://www.youtube.com/v/q-6oU3jXAho?version=3" type="application/x-shockwave-flash" width="640" height="390"/>
   <media:thumbnail url="https://i2.ytimg.com/vi/q-6oU3jXAho/hqdefault.jpg" width="480" height="360"/>
   <media:description>Sign Up on Patreon to get access to the Space Time Discord! 
https://www.patreon.com/pbsspacetime

Check out the Space Time Merch Store
https://pbsspacetime.com/

The moment you started observing reality, you hopelessly polluted any conclusions you might make about it. The anthropic principle guarantees that you are NOT seeing the universe in most typical state. But used correctly, this highly controversial idea can be extremely powerful. So, how do you correctly use the anthropic principle?

Hosted by Matt O'Dowd
Written by Matt O'Dowd
Graphics by Leonardo Scholzer &amp; Adriano Leal
Directed by: Andrew Kornhaber
Executive Producers: Eric Brown &amp; Andrew Kornhaber 
...</media:description>
   <media:community>
    <media:starRating count="7709" average="4.92" min="1" max="5"/>
    <media:statistics views="176224"/>
   </media:community>http://www.rssboard.org/media-rss
  </media:group>

How it is displayed: kriss-youtube

An extract of a Peertube feed:


<media:group>
                <media:content type="application/x-bittorrent" url="https://framatube.org/static/torrents/ed5c048d-01f3-4ceb-97db-6e278de512b0-1080.torrent" isDefault="true">
                </media:content>
                <media:content type="application/x-bittorrent" url="https://framatube.org/static/torrents/ed5c048d-01f3-4ceb-97db-6e278de512b0-720.torrent">
                </media:content>
                <media:content type="application/x-bittorrent" url="https://framatube.org/static/torrents/ed5c048d-01f3-4ceb-97db-6e278de512b0-480.torrent">
                </media:content>
                <media:content type="application/x-bittorrent" url="https://framatube.org/static/torrents/ed5c048d-01f3-4ceb-97db-6e278de512b0-360.torrent">
                </media:content>
                <media:content type="application/x-bittorrent" url="https://framatube.org/static/torrents/ed5c048d-01f3-4ceb-97db-6e278de512b0-240.torrent">
                </media:content>
                <media:rating>nonadult</media:rating>
            </media:group>
            <media:thumbnail url="https://framatube.org/static/thumbnails/ed5c048d-01f3-4ceb-97db-6e278de512b0.jpg" height="122" width="223">
            </media:thumbnail>

How it is displayed: kriss-peertube

What do you think?

tontof commented 4 years ago

Concerning the peertube enclosure, kriss feed does not detect all torrent version as there is only one enclosure and all the version are in media:group.

I've just added thumbnail and it's more difficult to take into account all torrent version. But it was what you asked for, so I think everything is as you expect now.

azmeuk commented 4 years ago

This is great. Thank you!

A detail though (but not related to Media-RSS): Peertube description is in a CDATA tag containing line breaks, but kriss_feed does not display line break.

tontof commented 4 years ago

I don't know how this problem can be handled as CDATA are not considered in kriss feed. I guess it's libxml that convert it. The problem is that it's not possible to print line break for description as it would mess most of other description containing html code.