peerflixrb 0.2.0 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6be0fd92f01b850ea44badcb38422e6c68c4e6c5
4
- data.tar.gz: 866101d388447ad1b22034a39980854625398ad5
3
+ metadata.gz: d2f2c082e18ca5a4abf745c880c5964fd09ea43f
4
+ data.tar.gz: c2fa0139362b9508400e5f4acab705a029405cff
5
5
  SHA512:
6
- metadata.gz: b219e41fa771fcca740a82e682c1435e787d0027242d592bc36e8af310007818bb86a8318773ffd73017bafc624727c1e9e01c976bbf5e14ed49fa2637564bd0
7
- data.tar.gz: 9609223d1a4b787afff08c045b1fca142d059263ff27491a37261fec1750c1fda3145e01ccf25b033adcfca535aa32310720e24132746e219e02c83c70801f5e
6
+ metadata.gz: 4a58425f9b6636a2e8750e29ee7ffa3f682419c1bb3f637afdf8abcae48769003ae9c40d14507da64e183f0f58c138acf2c9702cface71e449248399b226601d
7
+ data.tar.gz: 631fc9a08fd38a581203aa018eac2fce18638fc4125a8bf231673a30bfc55c75a875598f697bd6c5cee6e663906340edbe69fe821352df5a9bd673a0442c6c4e
data/README.md CHANGED
@@ -36,9 +36,11 @@ If you prefer to use your own subtitles file, you can do that with the ```-t SUB
36
36
 
37
37
  $ peerflixrb better call saul s02e04 -t subtitle_file.srt
38
38
 
39
- You can autoplay in VLC or MPlayer with the corresponding option.
39
+ You can autoplay in VLC or MPlayer with the corresponding option (Default: VLC).
40
40
 
41
- $ peerflixrb --vlc the big bang theory s09e16 hdtv
41
+ $ peerflixrb --mplayer the big bang theory s09e16 hdtv
42
+
43
+ Or you can just let it download without autoplaying with ```-n```.
42
44
 
43
45
 
44
46
  ## Cache
@@ -1,10 +1,14 @@
1
- #!/usr/bin/env ruby -w
1
+ #!/usr/bin/env ruby
2
2
  $LOAD_PATH.unshift File.join(File.dirname(__FILE__), *%w( .. lib ))
3
3
 
4
4
  require 'optparse'
5
5
  require 'peerflixrb'
6
6
 
7
- options = {}
7
+ options = {
8
+ language: 'en',
9
+ video_player: 'vlc'
10
+ }
11
+
8
12
  optparse = OptionParser.new do |opts|
9
13
  opts.banner = 'Usage: peerflixrb [options] <search>'
10
14
 
@@ -12,11 +16,15 @@ optparse = OptionParser.new do |opts|
12
16
  options[:find_subtitles] = s
13
17
  end
14
18
 
19
+ opts.on('-n', '--no-player', "Don't autoplay") do
20
+ options[:video_player] = nil
21
+ end
22
+
15
23
  opts.on('-m', '--mplayer', 'Autoplay in mplayer*') do
16
24
  options[:video_player] = 'mplayer'
17
25
  end
18
26
 
19
- opts.on('-v', '--vlc', 'Autoplay in vlc*') do
27
+ opts.on('-v', '--vlc', 'Autoplay in vlc* (Default)') do
20
28
  options[:video_player] = 'vlc'
21
29
  end
22
30
 
@@ -44,9 +52,6 @@ if options[:search].empty?
44
52
  exit
45
53
  end
46
54
 
47
- # Default language: English
48
- options[:language] ||= 'en'
49
-
50
55
  # main
51
56
  # TODO: handle failing and invalid searches
52
57
  kat = Peerflixrb::KAT.new(options[:search])
@@ -1,3 +1,3 @@
1
1
  module Peerflixrb
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.3.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.2.0
4
+ version: 0.3.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-09 00:00:00.000000000 Z
11
+ date: 2016-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri