Invidious is an alternative front-end to YouTube
Remove useless auto_generated param from PlaylistVideo#to_xml
Samantaz Fox6cf0ff6b49ee
diff --git a/src/invidious/playlists.cr b/src/invidious/playlists.crindex e25180c1..f37667b5 100644--- a/src/invidious/playlists.cr+++ b/src/invidious/playlists.cr@@ -11,7 +11,7 @@ struct PlaylistVideoproperty index : Int64property live_now : Bool- def to_xml(auto_generated, xml : XML::Builder)+ def to_xml(xml : XML::Builder)xml.element("entry") doxml.element("id") { xml.text "yt:video:#{self.id}" }xml.element("yt:videoId") { xml.text self.id }@@ -20,13 +20,8 @@ struct PlaylistVideoxml.element("link", rel: "alternate", href: "#{HOST_URL}/watch?v=#{self.id}")xml.element("author") do- if auto_generated- xml.element("name") { xml.text self.author }- xml.element("uri") { xml.text "#{HOST_URL}/channel/#{self.ucid}" }- else- xml.element("name") { xml.text author }- xml.element("uri") { xml.text "#{HOST_URL}/channel/#{ucid}" }- end+ xml.element("name") { xml.text self.author }+ xml.element("uri") { xml.text "#{HOST_URL}/channel/#{self.ucid}" }endxml.element("content", type: "xhtml") do@@ -47,14 +42,8 @@ struct PlaylistVideoendend- def to_xml(auto_generated, xml : XML::Builder? = nil)- if xml- to_xml(auto_generated, xml)- else- XML.build do |xml|- to_xml(auto_generated, xml)- end- end+ def to_xml(_xml : Nil = nil)+ XML.build { |xml| to_xml(xml) }enddef to_json(json : JSON::Builder, index : Int32? = nil)diff --git a/src/invidious/routes/feeds.cr b/src/invidious/routes/feeds.crindex 40c41dc1..f4a8467b 100644--- a/src/invidious/routes/feeds.cr+++ b/src/invidious/routes/feeds.cr@@ -281,9 +281,7 @@ module Invidious::Routes::Feedsxml.element("name") { xml.text playlist.author }end- videos.each do |video|- video.to_xml(false, xml)- end+ videos.each &.to_xml(xml)endendelse