peerflixrb 0.0.2 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +23 -5
- data/bin/peerflixrb +8 -4
- data/lib/peerflixrb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7923defe877bc6dad1ea6698fbf022b33d5a60fd
|
|
4
|
+
data.tar.gz: 7cf7ceffaa4f693828bc581c8e804fd8d2932073
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0e87cfba2ff48d72d4329e5a08c301e1461ca8cdef580ea6a60b6c2496fb0708d0485987a89b834f38130f29d1decb21e56a03ea893426f55b5c6b1b188fb038
|
|
7
|
+
data.tar.gz: bc124155b7804678a142ec38d81fe64b47cb7b3f5407f011ad6bc9826558b7af60e887c189c60805776ea7420b02920ab383d0785280043859b42a08657148a9
|
data/README.md
CHANGED
|
@@ -1,24 +1,32 @@
|
|
|
1
|
+
[](https://travis-ci.org/iovis9/peerflixrb) [](https://badge.fury.io/rb/peerflixrb)
|
|
2
|
+
|
|
1
3
|
# Peerflixrb
|
|
2
4
|
|
|
3
|
-
Wrapper for [peerflix](https://github.com/mafintosh/peerflix) with automatic search through [Kickass Torrents](kat.cr) and [Addic7ed](http://www.addic7ed.com/) (with [gem addic7ed](https://github.com/michaelbaudino/addic7ed-ruby)).
|
|
5
|
+
Wrapper for [peerflix](https://github.com/mafintosh/peerflix) with automatic search through [Kickass Torrents](kat.cr) and [Addic7ed](http://www.addic7ed.com/) (with [gem addic7ed](https://github.com/michaelbaudino/addic7ed-ruby)). It currently uses [VLC](http://www.videolan.org/vlc/index.html) as the player.
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
|
|
8
|
+
## Requirements
|
|
6
9
|
|
|
7
10
|
Make sure you have **peerflix** installed:
|
|
8
11
|
|
|
9
12
|
$ npm install -g peerflix
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
It currently supports VLC only as the media player (more to come in future releases).
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
Install the gem:
|
|
12
19
|
|
|
13
20
|
$ gem install peerflixrb
|
|
14
21
|
|
|
22
|
+
|
|
15
23
|
## Usage
|
|
16
24
|
|
|
17
|
-
|
|
25
|
+
Pass a string with what you want to watch and it will try to fetch the file and play it through peerflix:
|
|
18
26
|
|
|
19
27
|
$ peerflixrb suits s05e12
|
|
20
28
|
|
|
21
|
-
You can play with subtitles with ```-s``` option (Default: English).
|
|
29
|
+
You can play the video with subtitles with the ```-s``` option (Default: English). It will try and find the best match in [Addic7ed](http://www.addic7ed.com/).
|
|
22
30
|
|
|
23
31
|
$ peerflixrb -s Game Of Thrones S05E01
|
|
24
32
|
|
|
@@ -26,6 +34,16 @@ Choose the language with ```-l LANGUAGE``` ([Available Languages](https://github
|
|
|
26
34
|
|
|
27
35
|
$ peerflixrb -sl es-es Breaking Bad s05e03
|
|
28
36
|
|
|
37
|
+
If you prefer to use your own subtitles file, you can do that with the ```-t SUBTITLE_FILE``` option.
|
|
38
|
+
|
|
39
|
+
$ peerflix better call saul s02e04 -t subtitle_file.srt
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## Future plans
|
|
43
|
+
|
|
44
|
+
- Use cache if any.
|
|
45
|
+
- Choose player (currently VLC).
|
|
46
|
+
|
|
29
47
|
|
|
30
48
|
## Contributing
|
|
31
49
|
|
data/bin/peerflixrb
CHANGED
|
@@ -9,9 +9,12 @@ options = {}
|
|
|
9
9
|
OptionParser.new do |opts|
|
|
10
10
|
opts.banner = 'Usage: peerflixrb [options] <search>'
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
opts.on('-s', '--find-subtitles', 'Find subtitles on Addic7ed') do |s|
|
|
13
|
+
options[:find_subtitles] = s
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
opts.on('-t SUBTITLE_FILE', '--subtitles SUBTITLE_FILE', 'Use local subtitles') do |t|
|
|
17
|
+
options[:subtitles] = t
|
|
15
18
|
end
|
|
16
19
|
|
|
17
20
|
opts.on('-l LANGUAGE', '--language LANGUAGE', 'Language code to look subtitles for (default: English)') do |l|
|
|
@@ -36,7 +39,7 @@ exit if options[:search].empty?
|
|
|
36
39
|
kat = Peerflixrb::KAT.new(options[:search])
|
|
37
40
|
|
|
38
41
|
# Subtitle search
|
|
39
|
-
if options[:
|
|
42
|
+
if options[:find_subtitles]
|
|
40
43
|
begin
|
|
41
44
|
ep = Addic7ed::Episode.new(kat.filename)
|
|
42
45
|
sub_file = File.basename(ep.download_best_subtitle!(options[:language]))
|
|
@@ -54,6 +57,7 @@ end
|
|
|
54
57
|
# Peerflix command build
|
|
55
58
|
command = "peerflix '#{kat.magnet}'"
|
|
56
59
|
command << " --subtitles '#{sub_file}'" unless sub_file.nil?
|
|
60
|
+
command << " --subtitles '#{options[:subtitles]}'" if options[:subtitles]
|
|
57
61
|
# TODO: choose video player (default: VLC)
|
|
58
62
|
command << ' --vlc'
|
|
59
63
|
# TODO: pipe options and leave these as default
|
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: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Marchante
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-03-
|
|
11
|
+
date: 2016-03-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nokogiri
|