diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-07-23 09:03:37 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-07-23 09:03:37 -0500 |
| commit | bb20ec110e2844d3cff2c35af81dd031140f5784 (patch) | |
| tree | 3e524ace610f041e03bff215971ecf6d888238cc /src | |
| parent | 69e70124b45ff32f51785a961bb55c5e2b87a11b (diff) | |
| download | invidious-bb20ec110e2844d3cff2c35af81dd031140f5784.tar.gz invidious-bb20ec110e2844d3cff2c35af81dd031140f5784.tar.bz2 invidious-bb20ec110e2844d3cff2c35af81dd031140f5784.zip | |
Add metadata fix for videos with empty description
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious.cr | 3 |
1 files changed, 3 insertions, 0 deletions
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("<br>", " ") description = description.gsub("<br/>", " ") 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" |
