Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update ruby-progressbar #44

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
BUNDLE_PATH: "vendor/bundle"
BUNDLE_DISABLE_SHARED_GEMS: "true"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/pkg

/vendor/
coverage
/.bundle/
1 change: 0 additions & 1 deletion .rbenv-version

This file was deleted.

1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ bundler_args: --without development
rvm:
- 1.9.2
- 2.0.0
- 2.2.2
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source "https://rubygems.org"
gemspec

gem 'rake'
gem 'youtube-dl.rb'

group :development do
gem 'rake-notes'
Expand Down
20 changes: 15 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
PATH
remote: .
specs:
airstream (0.4.9)
airstream (0.4.11)
airplay (~> 0.2.9)
rack (~> 1.5.2)
ruby-progressbar (~> 1.1.1)
ruby-progressbar (~> 1.7.0)
webrick (~> 1.3.1)

GEM
Expand All @@ -21,7 +21,11 @@ GEM
builder (3.2.2)
childprocess (0.5.5)
ffi (~> 1.0, >= 1.0.11)
climate_control (0.2.0)
cocaine (0.6.0)
terrapin (= 0.6.0)
colored (1.2)
connection_pool (2.2.1)
coveralls (0.7.11)
multi_json (~> 1.10)
rest-client (>= 1.6.8, < 2)
Expand All @@ -45,8 +49,9 @@ GEM
minitest (5.5.1)
multi_json (1.11.0)
multi_test (0.1.2)
net-http-digest_auth (1.4)
net-http-digest_auth (1.4.1)
net-http-persistent (2.9.4)
connection_pool (~> 2.2)
netrc (0.10.3)
oj (2.12.1)
rack (1.5.5)
Expand All @@ -61,17 +66,21 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.2.0)
rspec-support (3.2.2)
ruby-progressbar (1.1.1)
ruby-progressbar (1.7.5)
simplecov (0.9.2)
docile (~> 1.1.0)
multi_json (~> 1.0)
simplecov-html (~> 0.9.0)
simplecov-html (0.9.0)
term-ansicolor (1.3.0)
tins (~> 1.0)
terrapin (0.6.0)
climate_control (>= 0.0.3, < 1.0)
thor (0.19.1)
tins (1.3.5)
webrick (1.3.1)
youtube-dl.rb (0.3.1.2016.09.11.1)
cocaine (>= 0.5.4)

PLATFORMS
ruby
Expand All @@ -85,6 +94,7 @@ DEPENDENCIES
oj
rake
rake-notes
youtube-dl.rb

BUNDLED WITH
1.10.6
1.15.1
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ You can also use wildcards and handle files as usually...
airstream /home/me/*.mp4 -o 192.168.1.8
airstream /home/me/my-birthday-20{08,10,12}.mov -o 192.168.1.8
```
Airstream automatically find your Apple TV on your local network. It also can play remote files, even from Youtube, Vimeo and others (don't forget to install youtube-dl).
```shell
airstream http://youtube.com/watch?v=gCluaJe3lb4
```

Use airimg to send images to the airplay device.
```shell
airimg http://example.com/photo.png -o 192.168.1.8
Expand Down
2 changes: 1 addition & 1 deletion airstream.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ lib/airstream/video.rb


s.add_dependency 'airplay', '~> 0.2.9'
s.add_dependency 'ruby-progressbar', '~> 1.1.1'
s.add_dependency 'ruby-progressbar', '~> 1.7.0'
s.add_dependency 'rack', '~> 1.5.2'
s.add_dependency 'webrick', '~> 1.3.1'

Expand Down
2 changes: 1 addition & 1 deletion lib/airstream/version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

module Airstream
VERSION = '0.4.10'
VERSION = '0.4.11'
end
15 changes: 14 additions & 1 deletion lib/airstream/video.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@

require 'rack'
require 'webrick'
require 'youtube-dl.rb'

module Airstream
class Video

@@server = nil

def initialize(video_file)
@filename = video_file
options = {
skip_download: true,
get_url: true,
format: :best,
continue: false,
color: false,
progress: false
}
begin
@filename = YoutubeDL::Runner.new(video_file, options).run
rescue # optionally: `except Exception, ex:`
@filename = video_file
end
end

def to_s
Expand Down