sensible-cinema 0.16.2 → 0.16.3

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
@@ -106,5 +106,5 @@ end
106
106
  desc 'j -S rake bundle_dependencies create_distro_dir ... (releases with clean cache dir, which we need now)'
107
107
  task 'full_release' => [:bundle_dependencies, :create_distro_dir, :build] do # :release sigh
108
108
  system("#{Gem.ruby} -S gem push #{Dir['pkg/*.gem'][-1]}")
109
- puts "don't forget to blog about it..."
109
+ puts "don't forget to blog about it...and upload .zip of it..."
110
110
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.16.2
1
+ 0.16.3
data/bin/sensible-cinema CHANGED
@@ -42,7 +42,7 @@ module SensibleSwing
42
42
  c.set_bounds(44,120,button_width,23)
43
43
  panel.add c
44
44
 
45
- b = JButton.new("Watch current DVD unedited")
45
+ b = JButton.new("Watch ripped version of DVD unedited")
46
46
  b.on_clicked {
47
47
  ENV['PATH'] = ENV['PATH'] + ";d:\\Program Files\\SMPlayer;c:\\Program Files\\SMPlayer"
48
48
  path = RubyWhich.new.which('smplayer')
@@ -53,14 +53,14 @@ module SensibleSwing
53
53
  (though VLC only has approximate timings).", "Lacking dependency", JOptionPane::ERROR_MESSAGE)
54
54
  system("start http://smplayer.sourceforge.net/downloads.php")
55
55
  else
56
- #drive, volume, md5 = choose_dvd_drive
57
- command = "smplayer dvd://"
56
+ wrote_to_here_fulli = do_copy_dvd_to_hard_drive false, true
57
+ command = "smplayer #{wrote_to_here_fulli}"
58
58
  puts command
59
59
  system(command)
60
60
  end
61
61
  }
62
62
  b.set_bounds(44,150,button_width,23)
63
- panel.add b
63
+ panel.add b if ARGV.index("--create-mode") # LODO allow end users to play it from here?
64
64
 
65
65
  d = JButton.new( "Preview edited section of current DVD" )
66
66
  d.on_clicked {
@@ -108,7 +108,7 @@ module SensibleSwing
108
108
  @progress_bar.set_bounds(44,280,button_width,23)
109
109
  @progress_bar.visible = false
110
110
  panel.add @progress_bar
111
- @buttons = [b,c,d,e,reload,@exit]
111
+ @buttons = [b,c,d,e,f,reload,@exit]
112
112
  check_for_dependencies
113
113
  end
114
114
 
@@ -161,7 +161,7 @@ module SensibleSwing
161
161
  }
162
162
  if matching.length == 1
163
163
  file = matching[0]
164
- p "selecting the one matching file #{file}"
164
+ p "selecting the one matching file #{file} #{md5}"
165
165
  file
166
166
  else
167
167
  nil
@@ -174,8 +174,9 @@ module SensibleSwing
174
174
  generate_and_run_bat_file *Storage['last_params']
175
175
  end
176
176
 
177
- def do_copy_dvd_to_hard_drive should_prompt_for_start_and_end_times
177
+ def do_copy_dvd_to_hard_drive should_prompt_for_start_and_end_times, want_full_list = false
178
178
  drive, dvd_volume_name, md5sum = choose_dvd_drive
179
+ p drive, dvd_volume_name, md5sum
179
180
  edit_list_path = single_edit_list_matches_dvd(md5sum)
180
181
  if !edit_list_path
181
182
  fc = FileDialog.new(self)
@@ -192,25 +193,34 @@ module SensibleSwing
192
193
 
193
194
  if should_prompt_for_start_and_end_times
194
195
  JOptionPane.showMessageDialog(nil, "Ok, let's preview just a portion of it. \nNote that you'll want to preview a section that wholly includes an edit decision in it\n For example, if it mutes from second 1 to second 10, you'll want to play from 00:00 to 00:12 or what not.\nAlso note that the first time you preview a section of a video, it will take like 20 minutes as it sets up the video for previewing.\nSubsequent previews will be faster, though, as long as you use the same filename.", "Preview!", JOptionPane::INFORMATION_MESSAGE)
195
- start_time = JOptionPane.showInputDialog("At what point in the video would you like to start your preview? (like 01:00 for starting at 1 minute)", Storage['start_time'])
196
- Storage['start_time'] = start_time
197
- end_time = JOptionPane.showInputDialog("At what point in the video would you like to finish your preview? (like 02:00 for ending at the 2 minute mark)", Storage['end_time'])
198
- Storage['end_time'] = end_time
199
- unless start_time and end_time
200
- JOptionPane.showMessageDialog(nil, " Please choose start and end", "Failed", JOptionPane::ERROR_MESSAGE)
201
- return
202
- end
196
+ start_time = JOptionPane.showInputDialog("At what point in the video would you like to start your preview? (like 01:00 for starting at 1 minute)", Storage['start_time'])
197
+ Storage['start_time'] = start_time
198
+ end_time = JOptionPane.showInputDialog("At what point in the video would you like to finish your preview? (like 02:00 for ending at the 2 minute mark)", Storage['end_time'])
199
+ Storage['end_time'] = end_time
200
+ unless start_time and end_time
201
+ JOptionPane.showMessageDialog(nil, " Please choose start and end", "Failed", JOptionPane::ERROR_MESSAGE)
202
+ return
203
+ end
203
204
  end
204
205
 
205
206
  fc.set_title "Pick where to save #{dvd_title} edited to"
206
207
 
207
208
  save_to_file_name = dvd_title + ' edited copy'
208
- save_to_file_name += ' single segment' if should_prompt_for_start_and_end_times
209
+ save_to_file_name += ' single segment' if should_prompt_for_start_and_end_times || want_full_list
209
210
  save_to_file_name=save_to_file_name.gsub(' ', '_').gsub( /\W/, '') # no punctuation for now...
210
211
  fc.setFile(DriveInfo.get_drive_with_most_space_with_slash + save_to_file_name)
211
212
  save_to = fc.go
212
213
  dvd_title_track = descriptors["dvd_title_track"]
214
+ # how does save_to map to fulli?
215
+ fulli = save_to + ".fulli.tmp.avi"
216
+ if want_full_list
217
+ if File.exist? fulli + ".done"
218
+ # just return the full path early...
219
+ return fulli
220
+ end
221
+ end
213
222
  generate_and_run_bat_file save_to, edit_list_path, descriptors, drive, dvd_title, start_time, end_time, dvd_title_track
223
+ fulli
214
224
  end
215
225
 
216
226
  def generate_and_run_bat_file save_to, edit_list_path, descriptors, drive, dvd_title, start_time, end_time, dvd_title_track
@@ -283,7 +293,8 @@ module SensibleSwing
283
293
 
284
294
  if selected_idx
285
295
  disk = opticals[selected_idx]
286
- return names[selected_idx][0..2], opticals[selected_idx].VolumeName, DriveInfo.md5sum_disk(opticals[selected_idx].Name)
296
+ prefix = names[selected_idx][0..2]
297
+ return prefix, opticals[selected_idx].VolumeName, DriveInfo.md5sum_disk(prefix)
287
298
  else
288
299
  puts 'did not select a drive...exiting'
289
300
  java.lang.System.exit 1
data/lib/drive_info.rb CHANGED
@@ -5,10 +5,11 @@ class DriveInfo
5
5
 
6
6
  def self.md5sum_disk(dir)
7
7
  digest = Digest::MD5.new()
8
-
9
- Dir[dir + "VIDEO_TS/*.IFO"].sort.each{|f|
8
+ files = Dir[dir + "VIDEO_TS/*.IFO"]
9
+ files.sort.each{|f|
10
10
  digest << File.binread(f)
11
11
  }
12
+ raise 'bad drive' unless files.length > 0
12
13
  digest.hexdigest
13
14
  end
14
15
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sensible-cinema}
8
- s.version = "0.16.2"
8
+ s.version = "0.16.3"
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"]
12
- s.date = %q{2010-12-03}
12
+ s.date = %q{2010-12-04}
13
13
  s.email = %q{rogerdpack@gmail.com}
14
14
  s.executables = ["sensible-cinema", "sensible-cinema-cli"]
15
15
  s.extensions = ["ext/mkrf_conf.rb"]
@@ -1,7 +1,7 @@
1
1
  "title" => "Bob's Big Plan",
2
- "disk_unique_id" => "d41d8cd98f00b204e9800998ecf8427e",
3
2
  "dvd_title_track" => 1,
4
3
  "other notes" => "could use more nit-picking of the song, as some parts seem all right in the end",
4
+ "disk_unique_id" => "259961ce38971cac3e28214ec4ec278b",
5
5
 
6
6
  "mutes" => [
7
7
  "00:03.8" , "01:03", "theme song is a bit raucous at times",
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 16
8
- - 2
9
- version: 0.16.2
8
+ - 3
9
+ version: 0.16.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Roger Pack
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-12-03 00:00:00 -07:00
17
+ date: 2010-12-04 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency