rget 4.9.1 → 4.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/hibiki.rb +5 -1
  3. data/rget.gemspec +1 -1
  4. metadata +3 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d65827f01054c03867de70b69123fc13d70c07ecd714f767289737efee55708b
4
- data.tar.gz: 6ceacd68af3a9af25695a3ddc27ac3bc83d63a76f249f184c17aef8d2786d0ab
3
+ metadata.gz: ce4daabfbe713595cc6bf6343c237e9fff9599f962fe25045025f6e54679c560
4
+ data.tar.gz: 4eec27c11a58ab8b97caa2974d0de31852c4e54b7cf46c3b7c9125a0ae659dcb
5
5
  SHA512:
6
- metadata.gz: 1a293295acdde2a41e766fcaf9154d7bb17210ae28ed08fd8e0ea974d36e3629bd79a129f8a0a72d522b81a51f1477dcef1dabe9321bc2c74cdc13db6a8c9aa4
7
- data.tar.gz: 8c12012be6641413183517fb462c2e7b975609b538db1dcb89e533e3df78212ec98cbd6a73580c7a9372fa68d6eaa9c6198a2470ee46b0a19c6f48bc3565b026
6
+ metadata.gz: b0cddcb3fec37d9b3a570a340254887552c5f6634a4b5142a6b905fd81b625a78544f4779d7483dcb3de550f63e6fd723f4846dbd502163db1cea3c976d6d914
7
+ data.tar.gz: 8e59ad5545d4ebf4997245a5f25145d09a91c96d08d5bbac6ad73ff8ded7b1432c56f1620873d37d4c23fa20a3323858ce15982ee1bf6544037b85f8e1b563ab
data/lib/hibiki.rb CHANGED
@@ -57,7 +57,11 @@ private
57
57
  playlist_url = video_info[:playlist_url]
58
58
  m3u8_url = URI(agent.get(playlist_url).body.scan(/http.*/).flatten.first)
59
59
 
60
- m3u8 = agent.get(m3u8_url).body.split("EXT-X-KEY").last
60
+ # choice the max size element from multi-part m3u8 file
61
+ m3u8s = agent.get(m3u8_url).body.split("EXT-X-KEY")
62
+ m3u8_sizes = m3u8s.map(&:size)
63
+ m3u8 = m3u8s[m3u8_sizes.index(m3u8_sizes.max)]
64
+
61
65
  key_url = m3u8.scan(/URI="(.*)"/).flatten.first
62
66
 
63
67
  tses = m3u8.scan(/^.*ts_.*\.ts/)
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.9.1"
7
+ spec.version = "4.9.2"
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, freshlive, himalaya and asobi store.}
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.9.1
4
+ version: 4.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - TADA Tadashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-10 00:00:00.000000000 Z
11
+ date: 2020-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -201,8 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
201
  - !ruby/object:Gem::Version
202
202
  version: '0'
203
203
  requirements: []
204
- rubyforge_project:
205
- rubygems_version: 2.7.7
204
+ rubygems_version: 3.1.2
206
205
  signing_key:
207
206
  specification_version: 4
208
207
  summary: Downloading newest radio programs on the web.