Skip to content

Commit

Permalink
Use print_format not output_format
Browse files Browse the repository at this point in the history
for compatibility with `ffprobe` version 4 (installed by default on CI machine)
  • Loading branch information
chrislo committed Oct 2, 2024
1 parent 0199d4a commit 1914a4a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/jobs/transcode_job_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class TranscodeJobTest < ActiveJob::TestCase
TranscodeJob.perform_now(track)

track.transcodes.mp3v0.first.file.open do |file|
cmd = "ffprobe -i #{file.path} -v quiet -output_format json -show_format"
cmd = "ffprobe -i #{file.path} -v quiet -print_format json -show_format"
std_out, _status = Open3.capture2(cmd)
metadata = JSON.parse(std_out)

Expand All @@ -76,11 +76,9 @@ class TranscodeJobTest < ActiveJob::TestCase
TranscodeJob.perform_now(track, format: :flac)

track.transcodes.flac.first.file.open do |file|
cmd = "ffprobe -i #{file.path} -output_format json -show_format"
cmd = "ffprobe -i #{file.path} -v quiet -print_format json -show_format"
std_out, _status = Open3.capture2(cmd)
puts std_out
metadata = JSON.parse(std_out)
puts metadata

assert_equal track.title, metadata['format']['tags']['TITLE']
assert_equal '01', metadata['format']['tags']['track']
Expand Down

0 comments on commit 1914a4a

Please sign in to comment.