mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-25 09:39:52 +05:30
Convert tabs to spaces
This commit is contained in:
parent
456e91426a
commit
4b2d942024
@ -98,12 +98,12 @@ module Invidious::Routes::API::V1::Videos
|
|||||||
|
|
||||||
webvtt = String.build do |str|
|
webvtt = String.build do |str|
|
||||||
str << <<-END_VTT
|
str << <<-END_VTT
|
||||||
WEBVTT
|
WEBVTT
|
||||||
Kind: captions
|
Kind: captions
|
||||||
Language: #{tlang || caption.language_code}
|
Language: #{tlang || caption.language_code}
|
||||||
|
|
||||||
|
|
||||||
END_VTT
|
END_VTT
|
||||||
|
|
||||||
caption_nodes = caption_xml.xpath_nodes("//transcript/text")
|
caption_nodes = caption_xml.xpath_nodes("//transcript/text")
|
||||||
caption_nodes.each_with_index do |node, i|
|
caption_nodes.each_with_index do |node, i|
|
||||||
@ -128,11 +128,11 @@ module Invidious::Routes::API::V1::Videos
|
|||||||
end
|
end
|
||||||
|
|
||||||
str << <<-END_CUE
|
str << <<-END_CUE
|
||||||
#{start_time} --> #{end_time}
|
#{start_time} --> #{end_time}
|
||||||
#{text}
|
#{text}
|
||||||
|
|
||||||
|
|
||||||
END_CUE
|
END_CUE
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -49,12 +49,12 @@ module Invidious::Videos
|
|||||||
end
|
end
|
||||||
result = String.build do |result|
|
result = String.build do |result|
|
||||||
result << <<-END_VTT
|
result << <<-END_VTT
|
||||||
WEBVTT
|
WEBVTT
|
||||||
Kind: captions
|
Kind: captions
|
||||||
Language: #{tlang || @language_code}
|
Language: #{tlang || @language_code}
|
||||||
|
|
||||||
|
|
||||||
END_VTT
|
END_VTT
|
||||||
|
|
||||||
result << "\n\n"
|
result << "\n\n"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user