samuelclay / NewsBlur

NewsBlur is a personal news reader that brings people together to talk about the world. A new sound of an old instrument.
http://www.newsblur.com
MIT License
6.83k stars 995 forks source link

Backend: Media-RSS support #1265

Open azmeuk opened 4 years ago

azmeuk commented 4 years ago

Alongside with its own namespace, Youtube uses the Media-RSS specification to provide metadata about the videos, like the thumbnail, the description, the number of views etc. Peertube also use Media-RSS for their feeds.

Youtube feeds are well displayed, but Peertube ones are not:

How a Youtube feed is displayed: newsblur-youtube

How a Peertube feed is displayed: newsblur-peertube

It would be amazing if peertube feeds were displayed as nicely as youtube ones are!

Éloi

samuelclay commented 4 years ago

I'd like to implement this but do you have an example of an RSS feed url that I can test with? Also, what exactly am I looking for in the feed to signal that it should be treated like the YouTube feed.

azmeuk commented 4 years ago

Here is a youtube feed: https://www.youtube.com/feeds/videos.xml?channel_id=UC7_gcs09iThXybpVgjHZ_7g

Here is a Peertube feed: https://framatube.org/feeds/videos.xml?accountId=3

Youtube articles contain a <media:group> tag with a lot of information:

  <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>

Peertube articles contain some <media:content> and <media:thumbnail> tags.

<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>

Tags provided by Youtube and Peertube are a bit different, even if they both use the Media-RSS extension. So I don't know if Peertube feeds should be "treated like youtube ones". But at list displaying the thumbnail, and the description if provided would be amazing!

Éloi

Chuhtra commented 9 months ago

Hi Sam, I hope the end of the year finds you well.

Is there any recent update/plan to work on this issue? I also faced this today, mainly affected by the thumbnail missing in Peertube feeds.

Thanks