mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-23 16:50:17 +05:30
Remove youtube IDs from ChannelVideo/PlaylistVideo #to_xml methods
This commit is contained in:
parent
add7f6f8fa
commit
7c3c0564f5
@ -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…
Reference in New Issue
Block a user