mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-31 12:01:36 +00:00
Fix Style/VariableNames issues
This commit is contained in:
@@ -168,11 +168,11 @@ module Invidious::Routes::Embed
|
||||
|
||||
preferred_captions = captions.select { |caption|
|
||||
params.preferred_captions.includes?(caption.name) ||
|
||||
params.preferred_captions.includes?(caption.languageCode.split("-")[0])
|
||||
params.preferred_captions.includes?(caption.language_code.split("-")[0])
|
||||
}
|
||||
preferred_captions.sort_by! { |caption|
|
||||
(params.preferred_captions.index(caption.name) ||
|
||||
params.preferred_captions.index(caption.languageCode.split("-")[0])).not_nil!
|
||||
params.preferred_captions.index(caption.language_code.split("-")[0])).not_nil!
|
||||
}
|
||||
captions = captions - preferred_captions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user