Skip to content

Commit

Permalink
Merge branch 'master' into add-exception
Browse files Browse the repository at this point in the history
  • Loading branch information
privatezero authored Mar 29, 2022
2 parents bc73d63 + e6b2a4f commit e17cc40
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions audioqc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ end
# If no extenstion is specified it will target the default 'wav' extension. (Not case sensitive)
options = []
ARGV.options do |opts|
opts.on('-a', '--all') { options += ['meta', 'bext', 'signal', 'dropouts', 'md5'] }
opts.on('-a', '--all') { options += ['meta', 'bext', 'signal', 'md5'] }
opts.on('-b', '--bext-scan') { options << 'bext' }
opts.on('-c', '--checksum') { options << 'md5' }
opts.on('-d', '--dropout-scan') { options << 'dropouts' }
Expand Down Expand Up @@ -250,10 +250,10 @@ class QcTarget
@qc_results = []
policy_path = File.path(policy)
command = 'mediaconch --Policy=' + '"' + policy_path + '" ' + '"' + @input_path + '"'
media_conch_out = `#{command}`
media_conch_out = `#{command}`.gsub(@input_path, "")
media_conch_out.strip!
media_conch_out.split('/n').each {|qcline| @qc_results << qcline}
@qc_results = @qc_results.to_s
@qc_results = @qc_results.to_s.gsub('\n -- ', '; ')
if File.exist?(policy)
if @qc_results.include?('pass!')
@qc_results = 'PASS'
Expand Down Expand Up @@ -349,6 +349,7 @@ end

file_inputs.each do |fileinput|
begin
puts "Scanning: #{fileinput}"
targetPath = File.expand_path(fileinput)
target = QcTarget.new(targetPath)
target.get_mediainfo
Expand Down

0 comments on commit e17cc40

Please sign in to comment.