mirror of
https://github.com/iv-org/invidious
synced 2024-11-27 13:33:28 +01:00
Avoid infinite loop in ChannelVideo's to_xml/to_json methods
This commit is contained in:
parent
12b818a83c
commit
dee20f92a7
@ -44,15 +44,11 @@ struct ChannelVideo
|
||||
end
|
||||
end
|
||||
|
||||
def to_json(locale, json : JSON::Builder | Nil = nil)
|
||||
if json
|
||||
to_json(locale, json)
|
||||
else
|
||||
def to_json(locale, _json : Nil = nil)
|
||||
JSON.build do |json|
|
||||
to_json(locale, json)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def to_xml(locale, query_params, xml : XML::Builder)
|
||||
query_params["v"] = self.id
|
||||
@ -88,15 +84,11 @@ struct ChannelVideo
|
||||
end
|
||||
end
|
||||
|
||||
def to_xml(locale, xml : XML::Builder | Nil = nil)
|
||||
if xml
|
||||
to_xml(locale, xml)
|
||||
else
|
||||
def to_xml(locale, _xml : Nil = nil)
|
||||
XML.build do |xml|
|
||||
to_xml(locale, xml)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def to_tuple
|
||||
{% begin %}
|
||||
|
Loading…
Reference in New Issue
Block a user