mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-29 17:26:23 -05:00
Fix typo in preferred_captions
This commit is contained in:
parent
8fc4dcfdea
commit
0dbef6ab9f
@ -241,7 +241,7 @@ get "/watch" do |env|
|
|||||||
params[:preferred_captions].includes?(caption.languageCode.split("-")[0])
|
params[:preferred_captions].includes?(caption.languageCode.split("-")[0])
|
||||||
}
|
}
|
||||||
preferred_captions.sort_by! { |caption|
|
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!
|
params[:preferred_captions].index(caption.languageCode.split("-")[0])).not_nil!
|
||||||
}
|
}
|
||||||
captions = captions - preferred_captions
|
captions = captions - preferred_captions
|
||||||
@ -341,7 +341,7 @@ get "/embed/:id" do |env|
|
|||||||
params[:preferred_captions].includes?(caption.languageCode.split("-")[0])
|
params[:preferred_captions].includes?(caption.languageCode.split("-")[0])
|
||||||
}
|
}
|
||||||
preferred_captions.sort_by! { |caption|
|
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!
|
params[:preferred_captions].index(caption.languageCode.split("-")[0])).not_nil!
|
||||||
}
|
}
|
||||||
captions = captions - preferred_captions
|
captions = captions - preferred_captions
|
||||||
|
Loading…
Reference in New Issue
Block a user