mts-autojoin 0.1.3 → 0.1.4

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
  SHA256:
3
- metadata.gz: 8959a55503a3c6b695b29e0f8fcc2d12cb54bf84512021edfd63cbda13659dae
4
- data.tar.gz: 6ef49f123213f5e958b511ba93d81100e9feda4dcbe2bf0e7acd8265dd3bfe0f
3
+ metadata.gz: 614bbeb2d139f83708a2a892fb6294016ba468ed27e8bdeb16152fe3c27ae4fa
4
+ data.tar.gz: 8947f69a0d6b9563f4afccebcad165df2811c7b02885ec275eb16b52d2d52b9a
5
5
  SHA512:
6
- metadata.gz: 1e70c3b9a6638fd878881a77350bc181973df19c97e8c15458d3494a4e63d5c7ea0fbf2bcd029f9ac122595abfd65f20aeb15c4493b6585faea7d45dda85278b
7
- data.tar.gz: b86883fbe54ec8b99a62f09015512bc0772b980b12ce93a694839678d0f7657691fee12cb6dd7d8d5016174c153e03fb09c6c758f872ac13f90f709742871092
6
+ metadata.gz: 9b7dfd26b121bf4279eb6c4e1601d854cfb2b00f1c1f7a09faa78f7f8a67ea5286e7f15354900125ad7b4fd26c13a5f3b9f2db7b454cc41a368e98be024a8945
7
+ data.tar.gz: 53e31a335222f38a18b4b28b8a184f8ef0ddb52d092044dc726d4778d67edb5d3fe1e694c62ec38a6158e45d4defd87f8d90586a1d9953695cf4122b0a8ed7d5
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mts-autojoin (0.1.3)
4
+ mts-autojoin (0.1.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -8,8 +8,8 @@ module Mts
8
8
  TWO_GIGABYTES = 2040000000
9
9
  FOUR_GIGABYTES = 4172000000
10
10
 
11
- attr_accessor :full_path
12
- attr_reader :video_files, :max_file_size, :grouped_video_files
11
+ attr_accessor :full_path, :video_files, :grouped_video_files
12
+ attr_reader :max_file_size
13
13
 
14
14
  def initialize(path)
15
15
  @full_path = File.expand_path(path || '/')
@@ -34,7 +34,8 @@ module Mts
34
34
  abort "No MTS files found at '#{full_path}'" if @video_files.empty?
35
35
  end
36
36
 
37
- # Check if there are 4 gigabyte files
37
+ # Update max_file_size to FOUR_GIGABYTES if there is at least one file
38
+ # equal or greather than 4 gigabytes
38
39
  def set_max_file_size
39
40
  @video_files.each do |file, size|
40
41
  if size >= FOUR_GIGABYTES
@@ -49,7 +50,7 @@ module Mts
49
50
 
50
51
  @video_files.each do |file, size|
51
52
  @grouped_video_files[current_filegroup] += [file]
52
- if File.size(File.expand_path(file, full_path)) <= max_file_size
53
+ if size < max_file_size
53
54
  current_filegroup += 1
54
55
  end
55
56
  end
@@ -70,7 +71,7 @@ module Mts
70
71
  end
71
72
 
72
73
  def execute_concat_command(file, number)
73
- system "ffmpeg -f concat -safe 0 -i #{file} -c copy video-output-#{number}.mts"
74
+ Kernel.system "ffmpeg -f concat -safe 0 -i #{file} -c copy video-output-#{number}.mts"
74
75
  end
75
76
 
76
77
  def delete_metafiles
@@ -1,5 +1,5 @@
1
1
  module Mts
2
2
  module Autojoin
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mts-autojoin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hugo Borges - agaelebe
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-17 00:00:00.000000000 Z
11
+ date: 2018-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler