videoinfo 0.5.1 → 0.5.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 096a7583c3c9e00cb9ae8708f4463dcbd4d39b82
4
- data.tar.gz: 27a80a1595184fae4052b344ee025d57e4d7c23a
3
+ metadata.gz: 1540c9b1061478e09e127acc50285960818975d2
4
+ data.tar.gz: 5e5582afcd1e71270f0ed0c1b8c3789599fa08b0
5
5
  SHA512:
6
- metadata.gz: 9dda9c6b0def54ee4f3a77ff3186b7a86c0a1d9314496a08a0aafd9fea6f97f7dadad3185fc8ab4a6591b5a059761a720ba8fb530aa9d985ee3b298f9e3909f5
7
- data.tar.gz: 999d8eedf0e4ce17fc25994520e1b8211902a98ef24e1ce970f104298e2564bf161ac989aa14d603ff5e9821d4db06c8482c16c2d16728e15d05a2abc470b49d
6
+ metadata.gz: 918d9b8527206079e62374e7aef1c926cba884f139d87b40a35e37abe8de11da353f26cf97413c0e6faebaf1709e2d101eb2c3f83cd205ae627564e964904a2c
7
+ data.tar.gz: 40d61469cc99306aa8548a582f4b163389c02eae4d6b074fed0232669cab681ea81dec2d9a8c7f7672eed31a7f6b8e51b33e041fde6c193590d5b66c69c4c78b
@@ -1,5 +1,8 @@
1
1
  ## CHANGELOG
2
2
 
3
+ #### Version 0.5.2 (April 23, 2016)
4
+ * Capture screenshots from the beginning of videos to avoid potential spoilers
5
+
3
6
  #### Version 0.5.1 (October 7, 2015)
4
7
  * Improve IMDB searching using filters
5
8
 
data/README.md CHANGED
@@ -40,7 +40,7 @@ Videoinfo.interactive = true # defaults to true when using
40
40
  $ videoinfo -h
41
41
  Usage: videoinfo [options] "MOVIENAME/SHOWNAME" file
42
42
  -i, --image-host=IMAGEHOST The image host to use for uploading screenshots. Default: Imgur
43
- -s, --screenshots=SCREENSHOTS The number of screenshots to create, max 7. Default: 2
43
+ -s, --screenshots=SCREENSHOTS The number of screenshots to create, max 6. Default: 2
44
44
  -e, --episode=EPISODE The TV show episode or season number. Formats: S01E01 or S01
45
45
  -n, --no-prompt Disable interactive mode
46
46
  -h, --help Show this message
@@ -16,9 +16,9 @@ module Videoinfo
16
16
  opts.on('-i', '--image-host=IMAGEHOST', "The image host to use for uploading screenshots. Default: #{image_host}") do |host|
17
17
  image_host = host
18
18
  end
19
- opts.on('-s', '--screenshots=SCREENSHOTS', "The number of screenshots to create, max 7. Default: #{screenshots}") do |ss|
19
+ opts.on('-s', '--screenshots=SCREENSHOTS', "The number of screenshots to create, max 6. Default: #{screenshots}") do |ss|
20
20
  screenshots = ss.to_i
21
- if screenshots > 7
21
+ if screenshots > 6
22
22
  STDERR.puts opts
23
23
  exit 1
24
24
  end
@@ -1,3 +1,3 @@
1
1
  module Videoinfo
2
- VERSION = '0.5.1'
2
+ VERSION = '0.5.2'
3
3
  end
@@ -41,8 +41,8 @@ module Videoinfo
41
41
  raise Error, 'unable to determine video duration' unless $?.success? && duration > 0
42
42
 
43
43
  images = []
44
- stepsize = screenshots == 1 ? 100 : 60 / (screenshots - 1)
45
- (20..80).step(stepsize) do |percent|
44
+ stepsize = screenshots == 1 ? 100 : 25 / (screenshots - 1)
45
+ (5..30).step(stepsize) do |percent|
46
46
  image = Tempfile.new(["ss_#{percent}.", '.png'])
47
47
  %x(#{Videoinfo.ffmpeg_binary} -y -ss #{duration * percent / 100} -i #{file.shellescape} -vframes 1 -f image2 #{image.path} -v quiet)
48
48
  if $?.success?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: videoinfo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Johns
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-07 00:00:00.000000000 Z
11
+ date: 2016-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: imdb
@@ -74,7 +74,7 @@ requirements:
74
74
  - mediainfo
75
75
  - ffmpeg
76
76
  rubyforge_project:
77
- rubygems_version: 2.4.6
77
+ rubygems_version: 2.5.1
78
78
  signing_key:
79
79
  specification_version: 4
80
80
  summary: Simple tool for aggregating video metadata and capturing screenshots