torrent_api 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +2 -1
- data/Rakefile +1 -1
- data/lib/pirate_bay/result.rb +4 -4
- data/torrent_api.gemspec +1 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -3,4 +3,5 @@
|
|
3
3
|
v0.0.3 fixed minor issue with 0.0.2
|
4
4
|
v0.0.9 Migrated from tpb to torrent_api (now includes torrent_reactor and demonoid as searches)
|
5
5
|
v0.1.0 Fixed Demonoid. Stable performance on :all and :demonoid.
|
6
|
-
v0.1.1 Fixed Demonoid torrent links to be absolute, not relative.
|
6
|
+
v0.1.1 Fixed Demonoid torrent links to be absolute, not relative.
|
7
|
+
v0.1.2 Fixed PirateBay filesizes to be in bytes.
|
data/Rakefile
CHANGED
data/lib/pirate_bay/result.rb
CHANGED
@@ -18,8 +18,6 @@ module PirateBay
|
|
18
18
|
magnet_link = nil
|
19
19
|
end
|
20
20
|
|
21
|
-
raw_filesize = row.css(".detDesc").first.content.match(/Size (.*[G|M|K]iB)/i)[1]
|
22
|
-
filesize_in_bytes = PirateBay::Result.filesize_in_bytes(raw_filesize)
|
23
21
|
|
24
22
|
self.name = row.css(".detName").first.content
|
25
23
|
self.seeds = row.css("td")[2].content.to_i
|
@@ -28,7 +26,9 @@ module PirateBay
|
|
28
26
|
self.link = row.css("td")[1].css("a[title='Download this torrent']").first[:href]
|
29
27
|
self.magnet_link = magnet_link
|
30
28
|
self.status = status
|
31
|
-
|
29
|
+
|
30
|
+
raw_filesize = row.css(".detDesc").first.content.match(/Size (.*[G|M|K]iB)/i)[1]
|
31
|
+
self.size = filesize_in_bytes(raw_filesize)
|
32
32
|
|
33
33
|
end
|
34
34
|
|
@@ -36,7 +36,7 @@ module PirateBay
|
|
36
36
|
"<PirateBay::Result @name => #{name}, @seeds => #{seeds}, @size => #{size}>"
|
37
37
|
end
|
38
38
|
|
39
|
-
def
|
39
|
+
def filesize_in_bytes(filesize)
|
40
40
|
match = filesize.match(/([\d.]+)(.*)/)
|
41
41
|
|
42
42
|
if match
|
data/torrent_api.gemspec
CHANGED