nyaa_anime 0.3.5 → 0.3.6
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 +4 -4
- 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: 9cf4a5f4fd7c88e19d9ee161ea0e6184909e71f0
|
4
|
+
data.tar.gz: bde9b108e3bc7cd07c80c5d387c8459f11dfdcdd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49bc891e22b69b273004482ee14f569578105e0886e9129147edbacd9d57463c27fb716b4be57fb43d0ecbee8710e20cee9417741cc1907cd0eeac5ba767b2bb
|
7
|
+
data.tar.gz: a4cd398f26d9e87c0d165b9f81dad675fc270160f2e0013c50d3b0895bda6ccc3ddf1ef8d17a8026afdf1b885b5c16b528612ee03cb79c2dd56190a7163757a4
|
data/lib/nyaa_anime.rb
CHANGED
@@ -36,8 +36,8 @@ class NyaaAnime
|
|
36
36
|
offset += THREAD_COUNT
|
37
37
|
end
|
38
38
|
end
|
39
|
-
titles = titles.reduce(
|
40
|
-
dl_urls = dl_urls.reduce(
|
39
|
+
titles = titles.reduce([]) { |a, b| b ? a.concat(b) : a }
|
40
|
+
dl_urls = dl_urls.reduce([]) { |a, b| b ? a.concat(b) : a }
|
41
41
|
return if titles.empty?
|
42
42
|
titles.each_with_index { |t, i| @downloads[t] = dl_urls[i] }
|
43
43
|
@titles = titles.sort!
|
@@ -56,8 +56,8 @@ class NyaaAnime
|
|
56
56
|
new_titles[i] = n.new_titles
|
57
57
|
new_downloads[i] = n.downloads.select { |ti, dl| n.new_titles.include? ti }
|
58
58
|
end
|
59
|
-
new_titles = new_titles.reduce(
|
60
|
-
new_downloads = new_downloads.reduce(
|
59
|
+
new_titles = new_titles.reduce(Set.new) { |a, b| b ? a.merge(b) : a }
|
60
|
+
new_downloads = new_downloads.reduce({}) { |a, b| b ? a.merge(b) : a }
|
61
61
|
@new_titles = new_titles
|
62
62
|
@titles = new_titles.to_a.sort!
|
63
63
|
@downloads = new_downloads
|
data/lib/nyaa_anime/version.rb
CHANGED