nyaa_anime 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: db19508ca23a44049cc98752b23f2e8440c52c56
4
- data.tar.gz: ce9b81cd34a5e276ee9a86fe8e9828d55362e049
3
+ metadata.gz: 95cc5ada91e4565d3dcc1b6132a076f27362a7ec
4
+ data.tar.gz: 82f3e978ce8f7e0c03765f33f68daffb7cd40439
5
5
  SHA512:
6
- metadata.gz: 2e77e9d2d0e58bd96b3a3cec04db5f0417e434ee62e9c8ecc18d81799efc141d6c82cb27d33a7c718c7a5ac8300d1bf1ad33ee260f03f1092dd941f1928914e3
7
- data.tar.gz: b3ab356a57a519d08d1e2444957304b40e5fb790702b8f5ce0d989addec3cb05826b18b392ea142d9f6e43eb3241f61e553eaf8250cd4dce41bc43fb5e70f16a
6
+ metadata.gz: 3286ec8ae9177438c7e1c91ece7fb460a2e36029353e793b08ff471c48bcbfb3d02989b855a18e0f2b2e1a651e2e1c60d84a46011e5504ba117cdf4791a8ad67
7
+ data.tar.gz: 8933a1268ee87fe499f77f128c9b1163156f6d3aea97ca1b4e2b9a312fa04b5d99e05b0848e31ecc6c26be9d434fbd6f0c666e8495602cf9b2bb23cf17d181c6
@@ -147,7 +147,9 @@ class NyaaAnime
147
147
  end
148
148
 
149
149
  def download(title)
150
- `wget --quiet -N --content-disposition -P #{NYAA_DL_DIR} "#{@downloads[title]}"`
150
+ torrent = open @downloads[title]
151
+ filename = torrent.meta["content-disposition"][/filename="(.+\.torrent)"/, 1]
152
+ open("#{NYAA_DL_DIR}#{filename}", "w") { |f| f.write torrent.read }
151
153
  puts "#{title}.torrent downloaded."
152
154
  "#{NYAA_DL_DIR}\"#{title}.torrent\""
153
155
  end
@@ -1,3 +1,3 @@
1
1
  class NyaaAnime
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nyaa_anime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Tsubaki Wu