video_conv 0.1.1 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/video_converter/version.rb +1 -1
- data/lib/video_converter.rb +10 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b04dc9407b04a11b89e1a628756c13570ed9e50e64c868e0720af8250726bb6
|
4
|
+
data.tar.gz: 1e448a29777aa9e4213b8d4548270f05e86aab7171f77932d3f970838170804c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1863c9615f6927194e79fda03a35e91e6514413e8ea4c1aff4f94646f7fde078bf9830e7f0a04cef2aa837f94a0f596d367052304863022d4a4937f345995d89
|
7
|
+
data.tar.gz: 120cef92bd67fc743813259f2d6b3c3c0149ac21c8798019fb7c9f9a55c4f0442f6e80172df6272187fbbac4c9b3a19dbe319a33567d42168f066072698355eb
|
data/lib/video_converter.rb
CHANGED
@@ -61,5 +61,15 @@ module VideoConverter
|
|
61
61
|
|
62
62
|
threads.each(&:join)
|
63
63
|
end
|
64
|
+
|
65
|
+
def convert_single_file(source_file, target_file)
|
66
|
+
if File.exist?(source_file)
|
67
|
+
convert_file(source_file, target_file)
|
68
|
+
puts "Converted: #{source_file} -> #{target_file}"
|
69
|
+
FileUtils.rm(source_file) # Remove the original file after conversion
|
70
|
+
else
|
71
|
+
puts "File not found: #{source_file}"
|
72
|
+
end
|
73
|
+
end
|
64
74
|
end
|
65
75
|
end
|