layback 0.0.3 → 0.0.4

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: a356ae8ea9dc021ca4a94bddc62143fba82c8c0d
4
- data.tar.gz: b95449813dc795cd55f59dc2be72fd968167e9d8
3
+ metadata.gz: 2e91ed65388cb6ea4ab20a7a2407e76b3db45488
4
+ data.tar.gz: ece69ef581b697c60e5e2c80dc9e0a0007b5e075
5
5
  SHA512:
6
- metadata.gz: 76770fa3de57375ac5e040778859b073a519ad14824e49f4bf21b19789e442f161e97b6a471b4e842b310811e6f9cdadb076b65375ff40b312caeeac09868057
7
- data.tar.gz: 591c6ea1109e8f5e9dd79b89f6583d5d4d498b49295ce6b3d5525119a54dfff55dbab9be0ce5e5067772168f4a83807e8c81e7f324a951dc17365e535d177816
6
+ metadata.gz: af93352ffa809dcc2ffc0a14a6a64b1f324ca7319403a21f90f731c6b05065567974026b438f98e5388396dfb898bdb8d7e04540efb5e97d4a5a07df05f4c9a6
7
+ data.tar.gz: 12903cfa7b5ce0ebf2145b998ff4eae9d0d22efbe822f6e5b304a1812e80073fb05e1b26836c75c584064f67bd2221fdcee965eaf9d7b5f3f373bb9f01dc7525
data/Gemfile CHANGED
@@ -1,8 +1,10 @@
1
1
  source 'https://rubygems.org'
2
- gem "file-monitor", "~> 0.1"
3
- gem "awesome_print", "~> 1.6"
4
- gem "logging", "~> 2.0"
5
- gem "rake"
6
- gem "rspec"
7
- gem "opensubtitles"
2
+
8
3
  #Specify your gem's dependencies in layback.gemspec
4
+ gemspec
5
+
6
+ group :development, :test do
7
+ gem "rake"
8
+ gem "rspec"
9
+ # gem 'jazz_fingers'
10
+ end
data/README.md CHANGED
@@ -7,7 +7,7 @@ When a movie finishes downloading `Layback` will search and download its subtitl
7
7
 
8
8
  ## Installation
9
9
 
10
- I don't know the reason for it, but installing the gem using sudo it not working. So I recommend you install RVM or rbenv in advance and then install layback with a non privileved user like yourself.
10
+ I don't know the reason for it, but installing the gem using sudo it not working. So I recommend you install RVM or rbenv in advance and then install layback with a non privileged user like yourself.
11
11
 
12
12
  see [RVM installtion](https://rvm.io/rvm/install)
13
13
 
data/bin/lang4subs CHANGED
@@ -18,7 +18,7 @@ if ARGV.size == 0
18
18
  end
19
19
 
20
20
  Settings.dir = ARGV[0]
21
- langs = ["eng", "por", "spa", "ger"]
21
+ langs = ["pob", "eng", "por", "spa", "ger"]
22
22
  langs = [] if ARGV.size > 1
23
23
  c = 0
24
24
  ARGV.each do|lang|
@@ -1,3 +1,3 @@
1
1
  module Layback
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
data/lib/os.rb CHANGED
@@ -34,10 +34,14 @@ class Os
34
34
  end
35
35
 
36
36
  def download_subs(file)
37
+ if File.basename(file) =~ /^sample\.(avi|mp4|mkv)/i
38
+ Sl.info("Not looking for subtitles for #{file}")
39
+ return
40
+ end
37
41
  delete_video_default_subtitle(file)
38
42
  Settings.langs.each do |lang|
39
43
  Sl.info "Language: #{lang}"
40
- se("getsub -s hinp -aLl #{lang} \"#{file}\"")
44
+ se("getsub -s hn -aLl #{lang} \"#{file}\"")
41
45
  # Will to it just for the 1st time
42
46
  make_default_subtitle(file, lang)
43
47
  end
@@ -46,6 +50,7 @@ class Os
46
50
 
47
51
  # Shell execute
48
52
  def se(command)
53
+ Sl.debug command
49
54
  o = `#{command}`
50
55
  r = $?.to_i
51
56
  Sl.debug "#{o} #{r}"
data/remote/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source 'https://rubygems.org'
2
+
3
+ #Specify your gem's dependencies in layback.gemspec
4
+ # gemspec
5
+ gem 'sinatra'
6
+ gem 'thin'
7
+ gem 'layback'
8
+ gem 'json'
9
+
10
+ group :development, :test do
11
+ gem "rake"
12
+ gem "rspec"
13
+ gem 'jazz_fingers'
14
+ end
@@ -0,0 +1,97 @@
1
+ GEM
2
+ remote: https://rubygems.org/
3
+ specs:
4
+ awesome_print (1.6.1)
5
+ byebug (8.2.1)
6
+ coderay (1.1.0)
7
+ coolline (0.5.0)
8
+ unicode_utils (~> 1.4)
9
+ daemons (1.2.3)
10
+ diff-lcs (1.2.5)
11
+ eventmachine (1.0.8)
12
+ ffi (1.9.10)
13
+ file-monitor (0.1.3)
14
+ rb-inotify (>= 0.8.8)
15
+ hirb (0.7.3)
16
+ jazz_fingers (3.0.0)
17
+ awesome_print (~> 1.6)
18
+ hirb (~> 0.7)
19
+ pry (~> 0.10)
20
+ pry-byebug (~> 3.1)
21
+ pry-coolline (~> 0.2)
22
+ pry-doc (~> 0.6)
23
+ pry-remote (>= 0.1.7)
24
+ json (1.8.3)
25
+ layback (0.0.3)
26
+ awesome_print (~> 1.6)
27
+ file-monitor (~> 0.1)
28
+ logging (~> 2.0)
29
+ opensubtitles
30
+ little-plugger (1.1.4)
31
+ logging (2.0.0)
32
+ little-plugger (~> 1.1)
33
+ multi_json (~> 1.10)
34
+ method_source (0.8.2)
35
+ multi_json (1.11.2)
36
+ opensubtitles (0.0.2)
37
+ pry (0.10.3)
38
+ coderay (~> 1.1.0)
39
+ method_source (~> 0.8.1)
40
+ slop (~> 3.4)
41
+ pry-byebug (3.3.0)
42
+ byebug (~> 8.0)
43
+ pry (~> 0.10)
44
+ pry-coolline (0.2.5)
45
+ coolline (~> 0.5)
46
+ pry-doc (0.8.0)
47
+ pry (~> 0.9)
48
+ yard (~> 0.8)
49
+ pry-remote (0.1.8)
50
+ pry (~> 0.9)
51
+ slop (~> 3.0)
52
+ rack (1.6.4)
53
+ rack-protection (1.5.3)
54
+ rack
55
+ rake (10.4.2)
56
+ rb-inotify (0.9.5)
57
+ ffi (>= 0.5.0)
58
+ rspec (3.4.0)
59
+ rspec-core (~> 3.4.0)
60
+ rspec-expectations (~> 3.4.0)
61
+ rspec-mocks (~> 3.4.0)
62
+ rspec-core (3.4.1)
63
+ rspec-support (~> 3.4.0)
64
+ rspec-expectations (3.4.0)
65
+ diff-lcs (>= 1.2.0, < 2.0)
66
+ rspec-support (~> 3.4.0)
67
+ rspec-mocks (3.4.0)
68
+ diff-lcs (>= 1.2.0, < 2.0)
69
+ rspec-support (~> 3.4.0)
70
+ rspec-support (3.4.1)
71
+ sinatra (1.4.6)
72
+ rack (~> 1.4)
73
+ rack-protection (~> 1.4)
74
+ tilt (>= 1.3, < 3)
75
+ slop (3.6.0)
76
+ thin (1.6.4)
77
+ daemons (~> 1.0, >= 1.0.9)
78
+ eventmachine (~> 1.0, >= 1.0.4)
79
+ rack (~> 1.0)
80
+ tilt (2.0.1)
81
+ unicode_utils (1.4.0)
82
+ yard (0.8.7.6)
83
+
84
+ PLATFORMS
85
+ ruby
86
+
87
+ DEPENDENCIES
88
+ jazz_fingers
89
+ json
90
+ layback
91
+ rake
92
+ rspec
93
+ sinatra
94
+ thin
95
+
96
+ BUNDLED WITH
97
+ 1.11.2
Binary file
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env ruby
2
+ require 'rubygems'
3
+ require 'bundler'
4
+
5
+ Bundler.require(:default, :development, :test)
6
+
7
+ # Shell execute
8
+ def se(command)
9
+ puts command
10
+ o = `#{command}`
11
+ r = $?.to_i
12
+ puts "#{o} #{r}"
13
+ r
14
+ end
15
+
16
+
17
+ get '/lang4subs' do
18
+ puts "Hello #{params.inspect}!"
19
+ se("lang4subs ~/Downloads #{params[:lang]}")
20
+ {result: "Changing language to #{params[:lang]}"}.to_json
21
+ end
22
+
23
+ get '/restart_minidlna' do
24
+ se("sudo service minidlna restart")
25
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: layback
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evandro Junior
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-24 00:00:00.000000000 Z
11
+ date: 2015-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -125,6 +125,10 @@ files:
125
125
  - lib/settings.rb
126
126
  - lib/sl.rb
127
127
  - lib/watcher.rb
128
+ - remote/Gemfile
129
+ - remote/Gemfile.lock
130
+ - remote/bin/layback_app.apk
131
+ - remote/layback-remote.rb
128
132
  homepage: https://github.com/evandrojr/layback
129
133
  licenses:
130
134
  - MIT
@@ -151,3 +155,4 @@ signing_key:
151
155
  specification_version: 4
152
156
  summary: Subtitles downloader on demand.
153
157
  test_files: []
158
+ has_rdoc: