miyuki 0.5 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/miyuki/miyuki.rb +2 -3
- data/lib/miyuki/tracker.rb +3 -5
- data/lib/miyuki/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: c1b5cdd2ca3a7334fb2e26d3d487ebc3a3412da4
|
4
|
+
data.tar.gz: ba67c450e2fd42b800e81563e83579f4fa8e46a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db06c6faa82622ca30115340ea6c501910d4ef6e294b0c76290471a2dd98d4919732cd27a917d5c900627266085de1af6158face2a6de8e9c92bb972c461525c
|
7
|
+
data.tar.gz: 8319890577375d7694bbecbfff86ce1e5fc0a0d52c9392e625b688bdad77a340c63d40c3ff36a67b91daa6005d8289e02a4694e2ca5e3da1d2d93569643f0e25
|
data/CHANGELOG.md
CHANGED
data/lib/miyuki/miyuki.rb
CHANGED
@@ -59,10 +59,9 @@ module Miyuki
|
|
59
59
|
old_torrents = @tracker.torrents
|
60
60
|
|
61
61
|
@tracker.refresh
|
62
|
-
@tracker.
|
62
|
+
@tracker.remove_duplicates_from(old_torrents)
|
63
63
|
|
64
|
-
|
65
|
-
new_torrents.each { |new_torrent| notify_torrents(new_torrent) }
|
64
|
+
old_torrents.each { |new_torrent| notify_torrents(new_torrent) }
|
66
65
|
end
|
67
66
|
|
68
67
|
def load_config
|
data/lib/miyuki/tracker.rb
CHANGED
@@ -48,11 +48,9 @@ module Miyuki
|
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
|
-
def
|
52
|
-
|
53
|
-
|
54
|
-
return true if torrent.link == other_torrent.link
|
55
|
-
end
|
51
|
+
def remove_duplicates_from(other_torrents)
|
52
|
+
other_torrents.delete_if do |torrent|
|
53
|
+
@torrents.select { |other_torrent| torrent.link == other_torrent.link }.any?
|
56
54
|
end
|
57
55
|
end
|
58
56
|
|
data/lib/miyuki/version.rb
CHANGED