yotsuba 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/yotsuba/anime.rb +1 -0
- data/lib/yotsuba/download.rb +10 -1
- data/lib/yotsuba/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: 48d3289804f7c84c1eed41d3bf2fb32b1531a05a
|
4
|
+
data.tar.gz: b6a84c8f189a424e2a5b5d180c686a6db9b9f023
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ec3be4b889ef85639bd6d4466186011d84753008a946db110d6edfdbd5aa4fc422d3614d0d0f4edb94ca072cb16a65ab6fd9caf18701ad63dc5c1f3fc8a335f
|
7
|
+
data.tar.gz: f298bf48eb88c324974732bd55137ecdabc568fae5626d8f7d530ebc539532d95490d65fa00308d67a86260f2840f141b2419aca300cd6ccb41aad238d301a18
|
data/lib/yotsuba/anime.rb
CHANGED
data/lib/yotsuba/download.rb
CHANGED
@@ -29,7 +29,7 @@ module Yotsuba
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def run
|
32
|
-
@path = @multiple ? File.join(@output_dir, @
|
32
|
+
@path = @multiple ? File.join(@output_dir, @file.name+".zip") : @path = File.join(@output_dir, @file.name)
|
33
33
|
|
34
34
|
FileUtils.mkdir_p @output_dir
|
35
35
|
|
@@ -48,8 +48,16 @@ module Yotsuba
|
|
48
48
|
self.async.run
|
49
49
|
end
|
50
50
|
|
51
|
+
def abort
|
52
|
+
finish_request
|
53
|
+
@status = "Aborted"
|
54
|
+
end
|
55
|
+
|
51
56
|
def delete
|
57
|
+
abort if @status != "Aborted"
|
52
58
|
File.delete(@path) if @path
|
59
|
+
@@all_downloads -= [self]
|
60
|
+
return true
|
53
61
|
end
|
54
62
|
|
55
63
|
def bytes_written
|
@@ -81,6 +89,7 @@ module Yotsuba
|
|
81
89
|
|
82
90
|
return match if match
|
83
91
|
end
|
92
|
+
return nil
|
84
93
|
end
|
85
94
|
|
86
95
|
def self.find(id)
|
data/lib/yotsuba/version.rb
CHANGED