Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion autohb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -459,12 +459,22 @@ def get_subtitle_track lang
if lang == "scan"
return lang
end
subtitles = @titles[@titles_to_rip.first].subtitles
title = @titles_to_rip.first ? @titles_to_rip.first.to_i : 1
subtitles = @titles[title].subtitles
subtitles.each do |subtitle|
if subtitle.nil?
next
end
if subtitle.lang == lang
return subtitle.number
end
end
langs = subtitles.reject(&:nil?).collect(&:lang)
raise <<~EX.chomp
no subtitle language "#{lang}" found (for track #{title}).
valid --subtitle= options (for that track, anyway):
#{langs.inspect}
EX
end

def get_subtitles
Expand Down