Remove youtube IDs from ChannelVideo/PlaylistVideo #to_xml methods

pull/2815/head
Samantaz Fox 3 years ago
parent add7f6f8fa
commit 7c3c0564f5
No known key found for this signature in database
GPG Key ID: F42821059186176E

@ -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}")

@ -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}")

@ -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}")

Loading…
Cancel
Save