summaryrefslogtreecommitdiffstats
path: root/src/invidious.cr
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-08-26 15:00:19 -0500
committerOmar Roth <omarroth@hotmail.com>2018-08-26 15:00:19 -0500
commit0dbef6ab9fb47d486883f0cb0a28d717b54c5a6f (patch)
treefe88ca420f847d72eeeec059a2bb9ef07aa7d08b /src/invidious.cr
parent8fc4dcfdead598f0efdd4ca0e4456c620b87f5a5 (diff)
downloadinvidious-0dbef6ab9fb47d486883f0cb0a28d717b54c5a6f.tar.gz
invidious-0dbef6ab9fb47d486883f0cb0a28d717b54c5a6f.tar.bz2
invidious-0dbef6ab9fb47d486883f0cb0a28d717b54c5a6f.zip
Fix typo in preferred_captions
Diffstat (limited to 'src/invidious.cr')
-rw-r--r--src/invidious.cr4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/invidious.cr b/src/invidious.cr
index dd2af9e6..ede2dcf6 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -241,7 +241,7 @@ get "/watch" do |env|
params[:preferred_captions].includes?(caption.languageCode.split("-")[0])
}
preferred_captions.sort_by! { |caption|
- (params[:preferred_captions].index(caption.languageCode) ||
+ (params[:preferred_captions].index(caption.name.simpleText) ||
params[:preferred_captions].index(caption.languageCode.split("-")[0])).not_nil!
}
captions = captions - preferred_captions
@@ -341,7 +341,7 @@ get "/embed/:id" do |env|
params[:preferred_captions].includes?(caption.languageCode.split("-")[0])
}
preferred_captions.sort_by! { |caption|
- (params[:preferred_captions].index(caption.languageCode) ||
+ (params[:preferred_captions].index(caption.name.simpleText) ||
params[:preferred_captions].index(caption.languageCode.split("-")[0])).not_nil!
}
captions = captions - preferred_captions