viddl-rb 0.5.0 → 0.5.1
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.
- data/bin/viddl-rb +7 -1
- metadata +4 -4
data/bin/viddl-rb
CHANGED
@@ -51,12 +51,14 @@ PluginBase.registered_plugins.each do |plugin|
|
|
51
51
|
if DownloadHelper.os_has?('ffmpeg')
|
52
52
|
no_ext_filename = url_name[:name].split('.')[0..-1][0]
|
53
53
|
#capture stderr because ffmpeg expects an output param and will error out
|
54
|
+
puts "Gathering information about the downloaded file."
|
54
55
|
file_info = Open3.popen3("ffmpeg -i #{url_name[:name]}") {|stdin, stdout, stderr, wait_thr| stderr.read }
|
55
|
-
|
56
|
+
puts "Done gathering information about the downloaded file."
|
56
57
|
if !file_info.to_s.empty?
|
57
58
|
audio_format_matches = file_info.match(/Audio: (\w*)/)
|
58
59
|
if audio_format_matches
|
59
60
|
audio_format = audio_format_matches[1]
|
61
|
+
puts "detected audio format: #{audio_format}"
|
60
62
|
else
|
61
63
|
puts "Couldn't find any audio:\n#{file_info.inspect}"
|
62
64
|
next
|
@@ -76,6 +78,10 @@ PluginBase.registered_plugins.each do |plugin|
|
|
76
78
|
output_extension = audio_format
|
77
79
|
end
|
78
80
|
output_filename = "#{no_ext_filename}.#{output_extension}"
|
81
|
+
if File.exist?(output_filename)
|
82
|
+
puts "Audio file seems to exist already, removing it before extraction."
|
83
|
+
File.delete(output_filename)
|
84
|
+
end
|
79
85
|
Open3.popen3("ffmpeg -i #{url_name[:name]} -vn -acodec copy #{output_filename}") {|stdin, stdout, stderr, wait_thr| stdout.read }
|
80
86
|
puts "Done extracting audio to #{output_filename}"
|
81
87
|
else
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: viddl-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-11-19 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
16
|
-
requirement: &
|
16
|
+
requirement: &70242056051380 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70242056051380
|
25
25
|
description: An extendable commandline video downloader for flash video sites. Includes
|
26
26
|
plugins for vimeo, youtube and megavideo
|
27
27
|
email: mail@marc-seeger.de
|
@@ -44,7 +44,7 @@ licenses: []
|
|
44
44
|
post_install_message:
|
45
45
|
rdoc_options: []
|
46
46
|
require_paths:
|
47
|
-
-
|
47
|
+
- .
|
48
48
|
required_ruby_version: !ruby/object:Gem::Requirement
|
49
49
|
none: false
|
50
50
|
requirements:
|