From bb20ec110e2844d3cff2c35af81dd031140f5784 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Mon, 23 Jul 2018 09:03:37 -0500 Subject: [PATCH] Add metadata fix for videos with empty description --- src/invidious.cr | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/invidious.cr b/src/invidious.cr index 91c513a4..84eb3dde 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -402,6 +402,9 @@ get "/watch" do |env| description = video.description.gsub("
", " ") description = description.gsub("
", " ") 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"