sportsflix 1.0.0 → 1.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/Gemfile.lock +2 -2
- data/lib/sportsflix/cli.rb +1 -0
- data/lib/sportsflix/players/proxies/acestream.rb +6 -1
- data/lib/sportsflix/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: dd7ec5c71729b4aa9385032df26998139d54e1c9
|
4
|
+
data.tar.gz: 3a9faa2b861c78917ef7ee66e42adb32bcc552fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2803dcdc2eee196546c1f4057223b57d90877c3a44be2af4880a7f3b6e704f6041b8a3a30247ad5f34b758b16df1297c68db0ae160e369d1c483b96fef8354b7
|
7
|
+
data.tar.gz: 37712bba003af41363a33bbc968276df8b673756cc164e7b4f41179fed5b0e2c08946f57af5ff1a0c3d84b272cb940fcd756f50d10154004526feed3817fb70e
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sportsflix (1.
|
4
|
+
sportsflix (1.1.0)
|
5
5
|
oga (~> 2.8)
|
6
6
|
thor (~> 0.19.4)
|
7
7
|
|
@@ -15,7 +15,7 @@ GEM
|
|
15
15
|
diff-lcs (1.3)
|
16
16
|
docile (1.1.5)
|
17
17
|
json (2.0.3)
|
18
|
-
oga (2.
|
18
|
+
oga (2.10)
|
19
19
|
ast
|
20
20
|
ruby-ll (~> 2.1)
|
21
21
|
parser (2.3.3.1)
|
data/lib/sportsflix/cli.rb
CHANGED
@@ -22,6 +22,7 @@ module Sportsflix
|
|
22
22
|
class_option('interactive', { :type => :boolean, :default => false })
|
23
23
|
class_option('server-only', { :aliases => :s, :type => :boolean, :default => false })
|
24
24
|
class_option('proxy-delay', { :type => :numeric, :default => DEFAULT_PROXY_DELAY })
|
25
|
+
class_option('server-ip', { :type => :string })
|
25
26
|
|
26
27
|
desc('watch', 'watch stream in the chosen player')
|
27
28
|
def watch
|
@@ -14,6 +14,7 @@ module Sportsflix
|
|
14
14
|
def initialize(options)
|
15
15
|
@verbose = options[:verbose]
|
16
16
|
@video_format = options['video-format']
|
17
|
+
@server_ip = options['server-ip']
|
17
18
|
|
18
19
|
@executor = Sportsflix::Utils::Executor.new(options)
|
19
20
|
end
|
@@ -29,11 +30,15 @@ module Sportsflix
|
|
29
30
|
|
30
31
|
def url(uri)
|
31
32
|
stream_uuid = uri.sub(ACESTREAM_STREAM_URI_PREFIX, '')
|
32
|
-
machine_ip = local_ip
|
33
|
+
machine_ip = @server_ip || get_ip_from_host || local_ip
|
33
34
|
"http://#{machine_ip}:8000/pid/#{stream_uuid}/stream.#{@video_format}"
|
34
35
|
end
|
35
36
|
|
36
37
|
private
|
38
|
+
def get_ip_from_host
|
39
|
+
ENV['DOCKER_HOST'].gsub(/tcp:\/\/(\S+?):.+/,'\1') if ENV['DOCKER_HOST']
|
40
|
+
end
|
41
|
+
|
37
42
|
def local_ip
|
38
43
|
# Turn off reverse DNS resolution temporarily
|
39
44
|
orig = Socket.do_not_reverse_lookup
|
data/lib/sportsflix/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sportsflix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Fernandes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|