sensible-cinema 0.18.0 → 0.18.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +17 -11
- data/TODO +1 -0
- data/VERSION +1 -1
- data/bin/sensible-cinema +6 -11
- data/lib/mencoder_wrapper.rb +0 -4
- data/lib/mplayer_edl.rb +8 -5
- data/sensible-cinema.gemspec +1 -1
- data/spec/mplayer_edl.spec.rb +1 -1
- metadata +2 -2
data/Rakefile
CHANGED
@@ -63,21 +63,27 @@ task 'bundle_dependencies' => 'gemspec' do
|
|
63
63
|
dependencies = spec.runtime_dependencies
|
64
64
|
dependencies = (dependencies + get_transitive_dependencies(dependencies)).uniq
|
65
65
|
Gem.loaded_specs.select{|name, spec| name == 'os'}
|
66
|
-
|
67
|
-
|
66
|
+
Dir['vendor/cache/**/*'].each{|f|
|
67
|
+
FileUtils.rm_rf f unless f =~ /jruby.*jar/ # that one takes too long to download...
|
68
|
+
}
|
69
|
+
FileUtils.mkdir_p 'vendor/cache'
|
68
70
|
Dir.chdir 'vendor/cache' do
|
69
71
|
dependencies.each{|d|
|
70
72
|
system("#{Gem.ruby} -S gem unpack #{d.name}")
|
71
73
|
}
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
74
|
+
to_here = "jruby-complete-1.5.5.jar"
|
75
|
+
unless File.exist? to_here
|
76
|
+
url = "/downloads/1.5.6/jruby-complete-1.5.6.jar"
|
77
|
+
puts 'downloading in jruby-complete.jar file ' + url
|
78
|
+
# jruby complete .jar file
|
79
|
+
Net::HTTP.start("jruby.org.s3.amazonaws.com") { |http|
|
80
|
+
resp = http.get(url)
|
81
|
+
puts 'copying it... '
|
82
|
+
open(to_here, "wb") { |file|
|
83
|
+
file.write(resp.body)
|
84
|
+
}
|
85
|
+
}
|
86
|
+
end
|
81
87
|
# create a shunt win32ole file, so that require 'win32ole' will work.
|
82
88
|
Dir.mkdir 'lib'
|
83
89
|
File.write('lib/win32ole.rb', 'require "jruby-win32ole"')
|
data/TODO
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.18.
|
1
|
+
0.18.1
|
data/bin/sensible-cinema
CHANGED
@@ -72,10 +72,12 @@ module SensibleSwing
|
|
72
72
|
|
73
73
|
def initialize
|
74
74
|
super "Sensible-Cinema"
|
75
|
-
|
75
|
+
version = File.read(File.dirname(__FILE__) + "/../VERSION")
|
76
|
+
p version
|
77
|
+
if !(Storage['main_license_accepted'] == version)
|
76
78
|
show_blocking_license_accept_dialog 'Sensible Cinema', 'gplv3', 'http://www.gnu.org/licenses/gpl.html'
|
77
79
|
show_blocking_license_accept_dialog 'Sensible Cinema', 'LICENSE file', File.expand_path(File.dirname(__FILE__) + "/../LICENSE.TXT"), 'LICENSE file', 'I acknowledge that I have read the LICENSE file.'
|
78
|
-
Storage['main_license_accepted'] =
|
80
|
+
Storage['main_license_accepted'] = version
|
79
81
|
end
|
80
82
|
|
81
83
|
setDefaultCloseOperation JFrame::EXIT_ON_CLOSE
|
@@ -95,8 +97,6 @@ module SensibleSwing
|
|
95
97
|
|
96
98
|
@create = new_jbutton( "Create edited copy of DVD on Your Hard Drive, from a DVD", false )
|
97
99
|
@create.on_clicked {
|
98
|
-
get_user_input('a', 'b')
|
99
|
-
|
100
100
|
do_copy_dvd_to_hard_drive false
|
101
101
|
}
|
102
102
|
|
@@ -304,12 +304,7 @@ EOL
|
|
304
304
|
|
305
305
|
include_class javax.swing.UIManager
|
306
306
|
def get_user_input(message, default = '')
|
307
|
-
|
308
|
-
UIManager.put("OptionPane.noButtonText", "Non");
|
309
|
-
UIManager.put("OptionPane.okButtonText", "D'accord");
|
310
|
-
UIManager.put("OptionPane.yesButtonText", "Oui");
|
311
|
-
|
312
|
-
start_time = JOptionPane.showInputDialog(message, default)
|
307
|
+
start_time = JOptionPane.showInputDialog(message, default)
|
313
308
|
end
|
314
309
|
|
315
310
|
def do_copy_dvd_to_hard_drive should_prompt_for_start_and_end_times, want_full_list = false
|
@@ -372,7 +367,7 @@ EOL
|
|
372
367
|
DriveInfo.get_drive_with_most_space_with_slash
|
373
368
|
end
|
374
369
|
|
375
|
-
def get_mencoder_commands descriptors, drive, save_to, start_time, end_time, dvd_title_track
|
370
|
+
def get_mencoder_commands descriptors, drive, save_to, start_time, end_time, dvd_title_track, should_prompt_for_start_and_end_times
|
376
371
|
MencoderWrapper.get_bat_commands descriptors, drive, save_to, start_time, end_time, dvd_title_track
|
377
372
|
end
|
378
373
|
|
data/lib/mencoder_wrapper.rb
CHANGED
@@ -15,10 +15,6 @@ This file is part of Sensible Cinema.
|
|
15
15
|
You should have received a copy of the GNU General Public License
|
16
16
|
along with Sensible Cinema. If not, see <http://www.gnu.org/licenses/>.
|
17
17
|
=end
|
18
|
-
if $0 == __FILE__
|
19
|
-
require 'rubygems'
|
20
|
-
require 'sane'
|
21
|
-
end
|
22
18
|
|
23
19
|
require_relative 'vlc_programmer'
|
24
20
|
|
data/lib/mplayer_edl.rb
CHANGED
@@ -19,13 +19,16 @@ require_relative 'overlayer'
|
|
19
19
|
|
20
20
|
class MplayerEdl
|
21
21
|
def self.convert_to_edl specs
|
22
|
-
out =
|
22
|
+
out = []
|
23
23
|
for type, metric in {"mutes" => 1, "blank_outs" => 0}
|
24
24
|
specs[type].each{|start, endy, other|
|
25
|
-
|
26
|
-
|
25
|
+
out << [OverLayer.translate_string_to_seconds(start), OverLayer.translate_string_to_seconds(endy), metric]
|
26
|
+
}
|
27
27
|
end
|
28
|
-
|
29
|
-
|
28
|
+
real_out = ''
|
29
|
+
out.sort.each{|start, endy, metric|
|
30
|
+
real_out += "#{start} #{endy} #{metric}\n"
|
31
|
+
}
|
32
|
+
real_out
|
30
33
|
end
|
31
34
|
end
|
data/sensible-cinema.gemspec
CHANGED
data/spec/mplayer_edl.spec.rb
CHANGED
@@ -25,9 +25,9 @@ describe MplayerEdl do
|
|
25
25
|
a = MplayerEdl.convert_to_edl({ "mutes"=>{105=>145, "46:33.5"=>2801}, "blank_outs" => {6 => 7} } )
|
26
26
|
# 0 for skip, 1 for mute
|
27
27
|
a.should == <<EOL
|
28
|
+
6.0 7.0 0
|
28
29
|
105.0 145.0 1
|
29
30
|
2793.5 2801.0 1
|
30
|
-
6.0 7.0 0
|
31
31
|
EOL
|
32
32
|
end
|
33
33
|
end
|