Remove youtube IDs from ChannelVideo/PlaylistVideo #to_xml methods

This commit is contained in:
Samantaz Fox 2022-04-17 15:41:13 +02:00
parent add7f6f8fa
commit 7c3c0564f5
No known key found for this signature in database
GPG key ID: F42821059186176E
3 changed files with 3 additions and 7 deletions

View file

@ -54,9 +54,7 @@ struct ChannelVideo
query_params["v"] = self.id
xml.element("entry") do
xml.element("id") { xml.text "yt:video:#{self.id}" }
xml.element("yt:videoId") { xml.text self.id }
xml.element("yt:channelId") { xml.text self.ucid }
xml.element("id") { xml.text "ni://invidious/sha-256;" + sha256("video/#{self.id}") }
xml.element("title") { xml.text self.title }
xml.element("link", rel: "alternate", href: "#{HOST_URL}/watch?#{query_params}")

View file

@ -18,7 +18,7 @@ struct SearchVideo
query_params["v"] = self.id
xml.element("entry") do
xml.element("id") { xml.text self.id }
xml.element("id") { xml.text "ni://invidious/sha-256;" + sha256("video/#{self.id}") }
xml.element("title") { xml.text self.title }
xml.element("link", rel: "alternate", href: "#{HOST_URL}/watch?#{query_params}")

View file

@ -13,9 +13,7 @@ struct PlaylistVideo
def to_xml(xml : XML::Builder)
xml.element("entry") do
xml.element("id") { xml.text "yt:video:#{self.id}" }
xml.element("yt:videoId") { xml.text self.id }
xml.element("yt:channelId") { xml.text self.ucid }
xml.element("id") { xml.text "ni://invidious/sha-256;" + sha256("video/#{self.id}") }
xml.element("title") { xml.text self.title }
xml.element("link", rel: "alternate", href: "#{HOST_URL}/watch?v=#{self.id}")