iv-org / invidious

Invidious is an alternative front-end to YouTube
https://invidious.io
GNU Affero General Public License v3.0
15.43k stars 1.7k forks source link

Suggestion: set icon element to channel logo on atom feeds #1064

Open agraven opened 4 years ago

agraven commented 4 years ago

When you have a large number of invidious feeds in your feed reader (I personally have over 30) it quickly becomes unmanageable when they all have the same icon. Setting the icon tag to the channel logo whenever possible would help with this.

agraven commented 4 years ago

@omarroth If I wanted to take a shot at implementing this, where would I start? I'm having a hard time getting an overview of which parts of the code does what

omarroth commented 4 years ago

The RSS feed itself is generated here. The channel variable should have what you need (you can see what's available here).

A patch would probably look something like

diff --git a/src/invidious.cr b/src/invidious.cr
index 74d0c79..1181ad8 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -3170,6 +3170,7 @@ get "/feed/channel/:ucid" do |env|
       xml.element("link", rel: "self", href: "#{host_url}#{env.request.resource}")
       xml.element("id") { xml.text "yt:channel:#{channel.ucid}" }
       xml.element("yt:channelId") { xml.text channel.ucid }
+      xml.element("your_tag") { xml.text channel.author_thumbnail }
       xml.element("title") { xml.text channel.author }
       xml.element("link", rel: "alternate", href: "#{host_url}/channel/#{channel.ucid}")
Perflyst commented 3 years ago

Not all RSS readers support the icon, some use the favicon as mentioned in https://github.com/iv-org/invidious/pull/1106#issuecomment-611932035 Some RSS readers are supported but not all, therefore re-opening.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely outdated. If you think this issue is still relevant and applicable, you just have to post a comment and it will be unmarked.