rget 4.3.5 → 4.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nicovideo.rb +7 -1
- data/rget.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b14e8e07970be57bb1962c8d8a4a62a47e274d78e03ba44c4bef49495cce7e09
|
4
|
+
data.tar.gz: 399e9c0d2efa5994cc10eefa3513d9b6e23b96553287933e6cc0c42a98ee639f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f95194db6ff713dfc4d46149b8a5af0bc9ec7855f703f40563e131ed4a7e6ebde22e19416ffd3c57be09ea39111a327d079884d6ea5870169d6af721052ade89
|
7
|
+
data.tar.gz: a39814953f5260514652e4325b0b2c85a00388db2b48d3d640f762bbc751ccd3c596096e741c229caee7647710fdad92db0a79b25b2446870d77c0c50d361aee
|
data/lib/nicovideo.rb
CHANGED
@@ -26,15 +26,21 @@ class Nicovideo < WebRadio
|
|
26
26
|
title = video.title || thumbinfo(video, 'title') || video.id
|
27
27
|
title.tr!('0-9', '0-9')
|
28
28
|
serial = title.scan(/(?:[#第]|[ ]EP|track-)(\d+)|/).flatten.compact[0].to_i
|
29
|
+
if serial == 0
|
30
|
+
tmp = title.scan(/\d+/).last.to_i
|
31
|
+
serial = tmp if tmp > 0
|
32
|
+
end
|
29
33
|
appendix = title =~ /おまけ|アフタートーク/ ? 'a' : ''
|
30
34
|
@file = "#{@label}##{'%02d' % serial}#{appendix}.#{video.type}"
|
31
35
|
@mp3_file = @file.sub(/\....$/, '.mp3')
|
32
36
|
mp3nize(@file, @mp3_file) do
|
33
37
|
open(@file, 'wb:ASCII-8BIT') do |o|
|
34
38
|
begin
|
39
|
+
count = 1
|
35
40
|
video.get_video do |body|
|
36
|
-
print '.'
|
41
|
+
print '.' if count % 400 == 0
|
37
42
|
o.write(body)
|
43
|
+
count += 1
|
38
44
|
end
|
39
45
|
rescue Niconico::Video::VideoUnavailableError => e
|
40
46
|
raise DownloadError.new(e.message)
|
data/rget.gemspec
CHANGED
@@ -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 = "4.
|
7
|
+
spec.version = "4.4.0"
|
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, onsen, niconico and freshlive.}
|
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: 4.
|
4
|
+
version: 4.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TADA Tadashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|