Skip to content

Commit

Permalink
Merge pull request #14 from Fullscreen/speech
Browse files Browse the repository at this point in the history
no errors with videos with 'speech' style
  • Loading branch information
kangkyu committed Sep 9, 2016
2 parents 8d72f89 + 373648c commit 7bffe71
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ For more information about changelogs, check
[Vandamme](http://tech-angels.github.io/vandamme).


## 1.3.2 - 2016.09.08

* [BUGFIX] Do not raise errors from videos with 'speech' style

## 1.3.1 - 2016.09.07

* [ENHANCEMENT] Fetch 'pause' annotation without errors.
Expand Down
2 changes: 1 addition & 1 deletion lib/yt/annotations/for.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def xml_to_annotations(xml)

def annotation_class(data)
case data['style']
when 'anchored' then Annotations::Speech
when 'anchored', 'speech' then Annotations::Speech
when 'branding' then Annotations::Branding
when 'highlightText' then Annotations::Spotlight
when 'label' then Annotations::Label
Expand Down
2 changes: 1 addition & 1 deletion lib/yt/annotations/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Yt
module Annotations
VERSION = '1.3.1'
VERSION = '1.3.2'
end
end
8 changes: 8 additions & 0 deletions spec/yt/annotations_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,14 @@
end
end

context 'given a video with a speech' do
let(:video_id) { 'BgUkm4xdf74' }

it 'does not raise an error' do
expect(annotations).to be
end
end

# NOTE: Third-party video, pause type annotation is no longer available.
context 'given a video with a pause type annotation' do
let(:video_id) { 'qLGxubfC1Ik' }
Expand Down

0 comments on commit 7bffe71

Please sign in to comment.