* feat(scanner): capture audio stream profile metadata Store ffprobe audio stream profiles in the existing audio track metadata JSON. This mirrors the video track profile field and is additive for clients that want to display or inspect codec profile details. * feat(catalogseed): carry audio profile in seed export records Keep AudioTrackRecord in parity with VideoTrackRecord, which already mirrors the video profile field, so seed exports do not drop the new audio profile metadata. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Silo Contributor <silo-contributor@example.invalid> Co-authored-by: Quick <31828688+Quick104@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
38 lines
1.0 KiB
Go
38 lines
1.0 KiB
Go
package scanner
|
|
|
|
import "testing"
|
|
|
|
func TestConvertProbeDataCapturesAudioProfile(t *testing.T) {
|
|
probe := convertProbeData(&ffprobeOutput{
|
|
Streams: []ffprobeStream{
|
|
{
|
|
CodecType: "audio",
|
|
CodecName: "eac3",
|
|
CodecLongName: "E-AC-3",
|
|
Profile: "Dolby Digital Plus + Dolby Atmos",
|
|
ChannelLayout: "5.1(side)",
|
|
Channels: 6,
|
|
BitRate: "768000",
|
|
SampleRate: "48000",
|
|
BitsPerRawSample: "24",
|
|
Disposition: ffprobeDisp{Default: 1},
|
|
Tags: map[string]string{"language": "eng", "title": "Main Audio"},
|
|
},
|
|
},
|
|
})
|
|
|
|
if len(probe.AudioTracks) != 1 {
|
|
t.Fatalf("audio tracks = %d, want 1", len(probe.AudioTracks))
|
|
}
|
|
track := probe.AudioTracks[0]
|
|
if track.Profile != "Dolby Digital Plus + Dolby Atmos" {
|
|
t.Fatalf("profile = %q, want Dolby Digital Plus + Dolby Atmos", track.Profile)
|
|
}
|
|
if track.Codec != "eac3" {
|
|
t.Fatalf("codec = %q, want eac3", track.Codec)
|
|
}
|
|
if !track.Default {
|
|
t.Fatal("expected default audio track")
|
|
}
|
|
}
|