kelredd-pruview 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of kelredd-pruview might be problematic. Click here for more details.

@@ -3,7 +3,7 @@ module Pruview
3
3
 
4
4
  MAJOR = 0
5
5
  MINOR = 1
6
- TINY = 9
6
+ TINY = 10
7
7
 
8
8
  def self.to_s # :nodoc:
9
9
  [MAJOR, MINOR, TINY].join('.')
@@ -8,7 +8,8 @@ module Pruview
8
8
  raise Pruview::Exceptions::InvalidError, "Invalid target directory: #{target_dir.to_s}" if !File.directory?(target_dir)
9
9
  raise Pruview::Exceptions::InvalidError, "Video not supported - file extension: " + file_extension(source) if !format_supported?(source)
10
10
  target = File.join(target_dir, name.to_s + '.jpg')
11
- run(build_command(source, '-ss 00:00:01.00', 'mjpeg', target), "Unable to get preview image for #{target}")
11
+ video = Video.new(source, target_dir)
12
+ run(build_command(source, "-ss 00:00:#{video.info['duration'] * 0.1}", 'mjpeg', target), "Unable to get preview image for #{target}")
12
13
  # TODO: analyze image - create better
13
14
  return target
14
15
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 9
9
- version: 0.1.9
8
+ - 10
9
+ version: 0.1.10
10
10
  platform: ruby
11
11
  authors:
12
12
  - Kelly Redding
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-09 00:00:00 -05:00
17
+ date: 2010-04-14 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency