rget 2.4.0 → 2.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/bin/rget +2 -0
  3. data/lib/nicovideo.rb +6 -1
  4. data/rget.gemspec +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a24d1551460816c90d72a95e53342e37607ad9d7
4
- data.tar.gz: 7aa874b01ddb243ea789b3ce6aa57d1e8ec3184f
3
+ metadata.gz: 70a1b0f82a44b66cf195de23ace14cd10f885816
4
+ data.tar.gz: bf625eae01130fc02aa08f8bbfd72c17a8b1f4b0
5
5
  SHA512:
6
- metadata.gz: 8a75f8d7a4ae78b4434ed0cad70f5f237fcee66f22f2a3f5c6e051797f02a022bdef3bd6602d50792014e103b37cd66b4272eb2b2c10fa1f080177c5cc753b26
7
- data.tar.gz: d5eabb9923843c6bd2fb41dd3f74516f47e8620012bf1704a5a6cd7aea2069541804769228dd27be1ffcb89c35db36a0c5b7c3ec4856dfd34bf801f2f0cb85be
6
+ metadata.gz: c3794535c82474dd94dda9673d0d314654b66a3082565837595960025bd87139b693573ee43959be727372ae2372cabc894b885bb23a5874d18a36a94a292d4d
7
+ data.tar.gz: ef66fa3009c7c5d6f3274f3ed2818ca156a3d474bb021b1ae8e5a3b1162939d518687687bd2c4919c40db5d7e4e7dc283488183f5264e1c830ee73c220902985
data/bin/rget CHANGED
@@ -42,6 +42,8 @@ class GetWebRadio < Thor
42
42
  end
43
43
  rescue WebRadio::NotFoundError => e
44
44
  $stderr.puts e.message
45
+ rescue WebRadio::DownloadError => e
46
+ $stderr.puts e.message
45
47
  end
46
48
  end
47
49
  end
@@ -17,7 +17,12 @@ class Nicovideo < WebRadio
17
17
  end
18
18
 
19
19
  def download(name)
20
- player_url = get_player_url(@url)
20
+ begin
21
+ player_url = get_player_url(@url)
22
+ rescue NoMethodError
23
+ raise DownloadError.new('video not found')
24
+ end
25
+
21
26
  video = @nico.video(Pathname(URI(player_url).path).basename.to_s)
22
27
  serial = video.title.scan(/(?:[#第]|[  ]EP|track-)(\d+)|/).flatten.compact[0].to_i
23
28
  appendix = video.title =~ /おまけ/ ? 'a' : ''
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "rget"
7
- spec.version = "2.4.0"
7
+ spec.version = "2.4.1"
8
8
  spec.authors = ["TADA Tadashi"]
9
9
  spec.email = ["t@tdtds.jp"]
10
10
  spec.description = %q{Downloading newest radio programs on the web. Supported radio stations are hibiki, animate, onsen, seaside communications, niconico and youtube.}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rget
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - TADA Tadashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-07 00:00:00.000000000 Z
11
+ date: 2016-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor