captive 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/captive/formats/vtt.rb +7 -2
- data/lib/captive/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 030c1968b45eac6bb952f8bfd45b569820747ec338c6c6b155c6c7ba22f61a77
|
4
|
+
data.tar.gz: 8f9819a585d7633b3dab6741d0a650e555171bdbdf578fcb8cad34016c415593
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d4cd22b2a652db4198de20628d68465fe84d0727e0e4db8586635b4fadcc5860e3767998a4fbd9364c3cdaf8f8a62a53d85b2faf8983c54f9ef87c754e36bfe
|
7
|
+
data.tar.gz: 3823a40e5354abff877951bd636a6e2482d38af42b281ba95ec8cd5be3fe7ba71188dea4242c790b05b7526f04c7df5d9e947403c110357e183520f625ba8887
|
data/lib/captive/formats/vtt.rb
CHANGED
@@ -31,8 +31,13 @@ module Captive
|
|
31
31
|
next
|
32
32
|
end
|
33
33
|
|
34
|
-
# If its not metadata, and its not an empty line, it should be a timestamp
|
35
|
-
|
34
|
+
# If its not metadata, and its not an empty line, it should be a timestamp or an identifier
|
35
|
+
unless time?(line)
|
36
|
+
# If this line is an identifier the next line should be a timecode
|
37
|
+
next if time?(lines[index + 1])
|
38
|
+
|
39
|
+
raise InvalidSubtitle, "Invalid Time Format at line #{index + 1}" unless time?(line)
|
40
|
+
end
|
36
41
|
|
37
42
|
elements = line.split
|
38
43
|
start_time = elements[0]
|
data/lib/captive/version.rb
CHANGED