mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-02 03:31:20 +05:30
Add metadata fix for videos with empty description
This commit is contained in:
parent
69e70124b4
commit
bb20ec110e
@ -402,6 +402,9 @@ get "/watch" do |env|
|
|||||||
description = video.description.gsub("<br>", " ")
|
description = video.description.gsub("<br>", " ")
|
||||||
description = description.gsub("<br/>", " ")
|
description = description.gsub("<br/>", " ")
|
||||||
description = XML.parse_html(description).content[0..200].gsub("\n", " ").strip(" ")
|
description = XML.parse_html(description).content[0..200].gsub("\n", " ").strip(" ")
|
||||||
|
if description.empty?
|
||||||
|
description = " "
|
||||||
|
end
|
||||||
|
|
||||||
thumbnail = "https://i.ytimg.com/vi/#{id}/mqdefault.jpg"
|
thumbnail = "https://i.ytimg.com/vi/#{id}/mqdefault.jpg"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user