my-local-putio 4.4.0 → 4.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +4 -4
- data/Rakefile +1 -0
- data/lib/my-local-putio/downloader.rb +1 -1
- data/lib/my-local-putio/fetcher.rb +8 -2
- data/lib/my-local-putio/version.rb +1 -1
- data/my-local-putio.gemspec +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b97f8142ada24f92bd2ba81ad1a698bf75b730ecb98f7878a10ddf84bfc6968
|
4
|
+
data.tar.gz: b1616b5139f17b2528fa61637df6082be9d330980d13ac515bdbe398a2effc4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c6b14174288fea62fe55b7b92b10afad8a0a8d2149c1bb2cebc73864b89caf7c45b6129ae658a2c03ef1a2420769ed877e1a6a3235f941a110500a8fac763e0
|
7
|
+
data.tar.gz: 60c701b5765e86541188bf4a43bd2b4c9fe69cc81809edfab416f657c640314bcf4a96d6ab1b2f9ea6ca57d13199c86b0e5f1289689efd76b535fa552c55fd51
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.1.0
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
my-local-putio (4.4.
|
4
|
+
my-local-putio (4.4.2)
|
5
5
|
socksify (= 1.7.1)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
rake (13.0.
|
10
|
+
rake (13.0.6)
|
11
11
|
socksify (1.7.1)
|
12
12
|
|
13
13
|
PLATFORMS
|
14
14
|
ruby
|
15
15
|
|
16
16
|
DEPENDENCIES
|
17
|
-
bundler (~> 2.
|
17
|
+
bundler (~> 2.3)
|
18
18
|
my-local-putio!
|
19
19
|
rake (~> 13.0)
|
20
20
|
|
21
21
|
BUNDLED WITH
|
22
|
-
2.
|
22
|
+
2.3.17
|
data/Rakefile
CHANGED
@@ -37,7 +37,7 @@ module MyLocalPutio
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def download_command(url, path)
|
40
|
-
temp_destination = File.join(configuration.temp_destination, path)
|
40
|
+
temp_destination = File.join(configuration.temp_destination, File.dirname(path))
|
41
41
|
|
42
42
|
command = [
|
43
43
|
"curl", "--create-dirs", "-L", "--retry", "5", "-S", "-C", "-", "-o", temp_destination, url.to_s
|
@@ -29,14 +29,20 @@ module MyLocalPutio
|
|
29
29
|
def process_file(file, path)
|
30
30
|
file_path = File.join(path, file.name)
|
31
31
|
if file.content_type == "application/x-directory"
|
32
|
-
|
32
|
+
while !directory_empty?(file)
|
33
|
+
fetch_files(id: file.id, path: file_path)
|
34
|
+
end
|
33
35
|
else
|
34
36
|
url = cli.get_download_url(file.id)["url"]
|
35
37
|
disk_manager.check_for_available_space_on_destinations!(file.size/1024/1024)
|
36
38
|
Downloader.new(@configuration).download(url, file_path) unless file_exists?(file_path, file)
|
37
39
|
SubtitlesManager.new(configuration).fetch(file, path)
|
38
40
|
end
|
39
|
-
delete_file(file_path, file)
|
41
|
+
delete_file(file_path, file)
|
42
|
+
end
|
43
|
+
|
44
|
+
def directory_empty?(file)
|
45
|
+
cli.get_files(file.id)["files"].count < 1
|
40
46
|
end
|
41
47
|
|
42
48
|
def delete_file(file_path, file)
|
data/my-local-putio.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
25
25
|
spec.require_paths = ["lib"]
|
26
26
|
|
27
|
-
spec.add_development_dependency "bundler", "~> 2.
|
27
|
+
spec.add_development_dependency "bundler", "~> 2.3"
|
28
28
|
spec.add_development_dependency "rake", "~> 13.0"
|
29
29
|
spec.add_dependency "socksify", "1.7.1"
|
30
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: my-local-putio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.4.
|
4
|
+
version: 4.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rafael Biriba
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.3'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2.
|
26
|
+
version: '2.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -85,7 +85,7 @@ metadata:
|
|
85
85
|
homepage_uri: https://github.com/rafaelbiriba/my-local-putio
|
86
86
|
source_code_uri: https://github.com/rafaelbiriba/my-local-putio
|
87
87
|
changelog_uri: https://github.com/rafaelbiriba/my-local-putio/blob/master/CHANGELOG.md
|
88
|
-
post_install_message:
|
88
|
+
post_install_message:
|
89
89
|
rdoc_options: []
|
90
90
|
require_paths:
|
91
91
|
- lib
|
@@ -100,8 +100,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '0'
|
102
102
|
requirements: []
|
103
|
-
rubygems_version: 3.
|
104
|
-
signing_key:
|
103
|
+
rubygems_version: 3.3.3
|
104
|
+
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: The easiest script to synchronise all your put.io files locally.
|
107
107
|
test_files: []
|