Invidious is an alternative front-end to YouTube
Avoid infinite loop in ChannelVideo's to_xml/to_json methods
Samantaz Foxdee20f92a762
diff --git a/src/invidious/channels/channels.cr b/src/invidious/channels/channels.crindex 155ec559..46e34dd6 100644--- a/src/invidious/channels/channels.cr+++ b/src/invidious/channels/channels.cr@@ -44,13 +44,9 @@ struct ChannelVideoendend- def to_json(locale, json : JSON::Builder | Nil = nil)- if json+ def to_json(locale, _json : Nil = nil)+ JSON.build do |json|to_json(locale, json)- else- JSON.build do |json|- to_json(locale, json)- endendend@@ -88,13 +84,9 @@ struct ChannelVideoendend- def to_xml(locale, xml : XML::Builder | Nil = nil)- if xml+ def to_xml(locale, _xml : Nil = nil)+ XML.build do |xml|to_xml(locale, xml)- else- XML.build do |xml|- to_xml(locale, xml)- endendend