diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/comments.cr | 4 | ||||
| -rw-r--r-- | src/invidious/helpers/i18n.cr | 1 | ||||
| -rw-r--r-- | src/invidious/routes/watch.cr | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/src/invidious/comments.cr b/src/invidious/comments.cr index 83074098..d8496978 100644 --- a/src/invidious/comments.cr +++ b/src/invidious/comments.cr @@ -609,6 +609,10 @@ end def content_to_comment_html(content, video_id : String? = "") html_array = content.map do |run| + # Sometimes, there is an empty element. + # See: https://github.com/iv-org/invidious/issues/3096 + next if run.as_h.empty? + text = HTML.escape(run["text"].as_s) if run["navigationEndpoint"]? diff --git a/src/invidious/helpers/i18n.cr b/src/invidious/helpers/i18n.cr index 9d3c4e8b..fd86594c 100644 --- a/src/invidious/helpers/i18n.cr +++ b/src/invidious/helpers/i18n.cr @@ -10,6 +10,7 @@ LOCALES_LIST = { "en-US" => "English", # English "eo" => "Esperanto", # Esperanto "es" => "Español", # Spanish + "et" => "Eesti keel", # Estonian "fa" => "فارسی", # Persian "fi" => "Suomi", # Finnish "fr" => "Français", # French diff --git a/src/invidious/routes/watch.cr b/src/invidious/routes/watch.cr index 75475430..7280de4f 100644 --- a/src/invidious/routes/watch.cr +++ b/src/invidious/routes/watch.cr @@ -306,7 +306,7 @@ module Invidious::Routes::Watch download_widget = JSON.parse(selection) extension = download_widget["ext"].as_s - filename = "#{video_id}-#{title}.#{extension}" + filename = "#{title}-#{video_id}.#{extension}" # Delete the now useless URL parameters env.params.body.delete("id") |
