peerflixrb 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a1f249bfa51b52a7931db22ccf84a0b0ec802020
4
- data.tar.gz: b586e5330b97547758d68b6b619f2e0eefbad3ec
3
+ metadata.gz: 7923defe877bc6dad1ea6698fbf022b33d5a60fd
4
+ data.tar.gz: 7cf7ceffaa4f693828bc581c8e804fd8d2932073
5
5
  SHA512:
6
- metadata.gz: 10feaae844fcef8a6fe47986c890038c93cf5ddfa539a31fb68a5fde494925e7dcc784d7fb7d4533a63b5fc4885636d230da56a3b804db1332b3afd597b75c12
7
- data.tar.gz: 4c4686c61f5d35860fa383439e314034b50df86aa4e678e057d64c2f79adc54ce0ad4edc599d74fbdb502af7faf415d43f4301b74149e511d7b9e990cc699122
6
+ metadata.gz: 0e87cfba2ff48d72d4329e5a08c301e1461ca8cdef580ea6a60b6c2496fb0708d0485987a89b834f38130f29d1decb21e56a03ea893426f55b5c6b1b188fb038
7
+ data.tar.gz: bc124155b7804678a142ec38d81fe64b47cb7b3f5407f011ad6bc9826558b7af60e887c189c60805776ea7420b02920ab383d0785280043859b42a08657148a9
data/README.md CHANGED
@@ -1,24 +1,32 @@
1
+ [![Build Status](https://travis-ci.org/iovis9/peerflixrb.svg?branch=master)](https://travis-ci.org/iovis9/peerflixrb) [![Gem Version](https://badge.fury.io/rb/peerflixrb.svg)](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
- ## Installation
7
+
8
+ ## Requirements
6
9
 
7
10
  Make sure you have **peerflix** installed:
8
11
 
9
12
  $ npm install -g peerflix
10
13
 
11
- And then install the gem:
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
- Just pass what you want to watch and it will try to fetch the file and play it through peerflix:
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
- # TODO: maybe create option for letting load a specific local file too
13
- opts.on('-s', '--with-subtitles', 'Play with subtitles') do |s|
14
- options[:subtitles] = s
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[:subtitles]
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
@@ -1,3 +1,3 @@
1
1
  module Peerflixrb
2
- VERSION = '0.0.2'.freeze
2
+ VERSION = '0.1.0'.freeze
3
3
  end
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.2
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-07 00:00:00.000000000 Z
11
+ date: 2016-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri