peerflixrb 6.0.3 → 6.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/peerflixrb/commands.rb +12 -3
- data/lib/peerflixrb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 826b84bfdb258e73d333e2e00c8a9e4392246ce7214a58b64f8627e3429f3053
|
4
|
+
data.tar.gz: 447a1ef9ab849b363cf96b9867f350ee99d16fbc60c49126a9105984f513c5c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd9e5f017ba2b09e401b66fcb25de9594c7f3c4901957015b20b593b6fe9e6c4cfd4c06123f91386452ca33568f8cce2fd783e3ae1a6f106a24ef8bd43c506c6
|
7
|
+
data.tar.gz: 2735d012e1d463e238b735795b594c25cc09f6e13f11c3cb2e1f8980a5522efd0eef7bcd8e916f2eedc9924ba3e06a02601a5091a2e5443016c8507000a74585
|
data/lib/peerflixrb/commands.rb
CHANGED
@@ -10,20 +10,29 @@ module Peerflixrb
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def check_requirements
|
13
|
-
unless
|
13
|
+
unless node_installed?
|
14
14
|
say 'Nodejs is required to make it work.'.red
|
15
15
|
exit
|
16
16
|
end
|
17
17
|
|
18
|
-
unless
|
18
|
+
unless webtorrent_installed?
|
19
19
|
say 'webtorrent is required. Type "npm install -g webtorrent-cli" in your shell to install it.'.red
|
20
20
|
exit
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
24
24
|
def webtorrent
|
25
|
+
return 'webtorrent' if webtorrent_installed?
|
25
26
|
return "#{BINARY_PATH}/webtorrent-cli-#{os}" if os
|
26
|
-
|
27
|
+
check_requirements
|
28
|
+
end
|
29
|
+
|
30
|
+
def node_installed?
|
31
|
+
system('node --version > /dev/null 2>&1')
|
32
|
+
end
|
33
|
+
|
34
|
+
def webtorrent_installed?
|
35
|
+
system('webtorrent --version > /dev/null 2>&1')
|
27
36
|
end
|
28
37
|
|
29
38
|
def choose_video_and_subtitles(search_result, options)
|
data/lib/peerflixrb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: peerflixrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Marchante
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addic7ed_downloader
|