sensible-cinema 0.18.0 → 0.18.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/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
- FileUtils.rm_rf 'vendor/cache'
67
- Dir.mkdir 'vendor/cache'
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
- puts 'downloading in jruby-complete.jar file'
73
- # jruby complete .jar file
74
- Net::HTTP.start("jruby.org.s3.amazonaws.com") { |http|
75
- resp = http.get("/downloads/1.5.6/jruby-complete-1.5.6.jar")
76
- puts 'copying it... '
77
- open("jruby-complete-1.5.5.jar", "wb") { |file|
78
- file.write(resp.body)
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
@@ -5,6 +5,7 @@
5
5
  realtime
6
6
  mplayer EDL...
7
7
  test...
8
+ out of order ok?
8
9
 
9
10
  simplify/de-bugify
10
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.18.0
1
+ 0.18.1
@@ -72,10 +72,12 @@ module SensibleSwing
72
72
 
73
73
  def initialize
74
74
  super "Sensible-Cinema"
75
- if !Storage['main_license_accepted']
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'] = true
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
- require "_dbg"
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
 
@@ -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
 
@@ -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
- out += "#{OverLayer.translate_string_to_seconds start} #{OverLayer.translate_string_to_seconds endy} #{metric}\n"
26
- }
25
+ out << [OverLayer.translate_string_to_seconds(start), OverLayer.translate_string_to_seconds(endy), metric]
26
+ }
27
27
  end
28
- out
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
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sensible-cinema}
8
- s.version = "0.18.0"
8
+ s.version = "0.18.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Roger Pack"]
@@ -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
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 18
8
- - 0
9
- version: 0.18.0
8
+ - 1
9
+ version: 0.18.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Roger Pack