libis-format 1.3.6 → 1.3.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/libis/format/converter/chain.rb +10 -0
- data/lib/libis/format/tool/ff_mpeg.rb +1 -1
- data/lib/libis/format/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d965e1a4bd413734b46ad2566ccc59fa98bf00fad85e4105367316171a1697d5
|
4
|
+
data.tar.gz: a49ed1bfd6cbc79a3874a3520fb9569c1bf7916c6c9d0b74ad137bef4017f52d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3951388c8f27465bf948887689a55a6132d7ccc9e8d51899d1644423a7c67c76719d71d1b2169cc1f9533ad9a5d0a55644226311cea2f0e98959638c9f11e8dc
|
7
|
+
data.tar.gz: 9b7ea1abc5e9bdadc6da474adf23a266a95e80a5e7f194a7e5f4733eae88f58e75586bfc222fca05c06d68bda62724e02847bea563749d5be0bd4262c6f2bc55
|
@@ -53,6 +53,7 @@ module Libis
|
|
53
53
|
|
54
54
|
def to_s
|
55
55
|
result = @source_format.to_s
|
56
|
+
result << '->-'
|
56
57
|
result << @converter_chain.map { |node| node_to_s(node) }.join('->-')
|
57
58
|
end
|
58
59
|
|
@@ -69,6 +70,7 @@ module Libis
|
|
69
70
|
|
70
71
|
# noinspection RubyParenthesesAroundConditionInspection
|
71
72
|
conversion_success = @converter_chain.each_with_index do |node, i|
|
73
|
+
debug "Converting with node #{node}"
|
72
74
|
target_type = node[:output]
|
73
75
|
converter_class = node[:converter]
|
74
76
|
converter = converter_class.new
|
@@ -77,6 +79,8 @@ module Libis
|
|
77
79
|
converter.send operation[:method], operation[:argument]
|
78
80
|
end
|
79
81
|
|
82
|
+
debug "Converter: #{converter.inspect}"
|
83
|
+
|
80
84
|
target = target_file
|
81
85
|
|
82
86
|
if i < size - 1
|
@@ -87,7 +91,9 @@ module Libis
|
|
87
91
|
|
88
92
|
FileUtils.mkdir_p File.dirname(target)
|
89
93
|
|
94
|
+
debug "Target file: #{target}"
|
90
95
|
r = converter.convert(src_file, target, target_type)
|
96
|
+
debug "Conversion result: #{r}"
|
91
97
|
|
92
98
|
src_file = r[:files].first
|
93
99
|
xtra_files += r[:files][1..]
|
@@ -98,8 +104,12 @@ module Libis
|
|
98
104
|
:success
|
99
105
|
end
|
100
106
|
|
107
|
+
debug "Final conversion result: #{conversion_success}"
|
108
|
+
|
101
109
|
result[:files] = [src_file] + xtra_files
|
102
110
|
|
111
|
+
debug "Final result: #{result}"
|
112
|
+
|
103
113
|
temp_files.each do |f|
|
104
114
|
FileUtils.rm(f, force: true)
|
105
115
|
end
|
@@ -40,7 +40,7 @@ module Libis
|
|
40
40
|
)
|
41
41
|
|
42
42
|
raise "#{self.class} took too long (> #{timeout} seconds) to complete" if result[:timeout]
|
43
|
-
raise "#{self.class} errors: #{result[:err].join("\n")}" unless
|
43
|
+
raise "#{self.class} errors: #{result[:err].join("\n")}" unless result[:status] == 0
|
44
44
|
|
45
45
|
warn "FFMpeg warnings: #{(result[:err] + result[:out]).join("\n")}" unless result[:err].empty?
|
46
46
|
|
data/lib/libis/format/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libis-format
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kris Dekeyser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chromaprint
|