yt-annotations 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/yt/annotations/for.rb +5 -0
- data/lib/yt/annotations/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37ba3cf90c0e0f4e1a0ec24a8b9f394b45105521
|
4
|
+
data.tar.gz: 03bcc3dc7a37ca76b99756a8b9373bd4f3d2f7d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aeeca0a38215951bd3838e48ce9a8ca0b7f97aa8970c786bac8868d73d0f09bd6906de5af4dc1cad76af07578e56e96403b1044c4c34122d23032bdae24f9f42
|
7
|
+
data.tar.gz: 532e34c8ca14c89e6697020b973feefeacd4d5f06db3f71be5d4b001a0f2e89e11df5ccb5c43414b4f13db695f844962fc0c62bfc7a6ed7a542947b0b110873f
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,10 @@ For more information about changelogs, check
|
|
6
6
|
[Keep a Changelog](http://keepachangelog.com) and
|
7
7
|
[Vandamme](http://tech-angels.github.io/vandamme).
|
8
8
|
|
9
|
+
## 1.2.2 - 2016.05.16
|
10
|
+
|
11
|
+
* [BUGFIX] Do not raise errors from videos with info cards.
|
12
|
+
|
9
13
|
## 1.2.1 - 2016.02.05
|
10
14
|
|
11
15
|
* [ENHANCEMENT] Update homepage on rubygems.org
|
data/lib/yt/annotations/for.rb
CHANGED
@@ -23,6 +23,7 @@ module Yt
|
|
23
23
|
annotations = xml['document']['annotations']
|
24
24
|
annotations = Array.wrap (annotations || {})['annotation']
|
25
25
|
annotations = merge_highlights annotations
|
26
|
+
annotations = exclude_drawers annotations
|
26
27
|
annotations.map{|data| annotation_class(data).new data}
|
27
28
|
end
|
28
29
|
|
@@ -42,6 +43,10 @@ module Yt
|
|
42
43
|
end
|
43
44
|
end
|
44
45
|
|
46
|
+
def exclude_drawers(annotations)
|
47
|
+
annotations.reject{|a| a['type'] == 'drawer'}
|
48
|
+
end
|
49
|
+
|
45
50
|
def merge_highlights(annotations)
|
46
51
|
highlights, others = annotations.partition{|a| a['type'] == 'highlight'}
|
47
52
|
highlights.each do |highlight|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yt-annotations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- claudiob
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
151
|
version: '0'
|
152
152
|
requirements: []
|
153
153
|
rubyforge_project:
|
154
|
-
rubygems_version: 2.
|
154
|
+
rubygems_version: 2.6.4
|
155
155
|
signing_key:
|
156
156
|
specification_version: 4
|
157
157
|
summary: Fetch annotations and cards from YouTube videos.
|