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 +4 -4
- data/lib/nyaa_anime.rb +3 -1
- data/lib/nyaa_anime/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95cc5ada91e4565d3dcc1b6132a076f27362a7ec
|
4
|
+
data.tar.gz: 82f3e978ce8f7e0c03765f33f68daffb7cd40439
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3286ec8ae9177438c7e1c91ece7fb460a2e36029353e793b08ff471c48bcbfb3d02989b855a18e0f2b2e1a651e2e1c60d84a46011e5504ba117cdf4791a8ad67
|
7
|
+
data.tar.gz: 8933a1268ee87fe499f77f128c9b1163156f6d3aea97ca1b4e2b9a312fa04b5d99e05b0848e31ecc6c26be9d434fbd6f0c666e8495602cf9b2bb23cf17d181c6
|
data/lib/nyaa_anime.rb
CHANGED
@@ -147,7 +147,9 @@ class NyaaAnime
|
|
147
147
|
end
|
148
148
|
|
149
149
|
def download(title)
|
150
|
-
|
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
|
data/lib/nyaa_anime/version.rb
CHANGED