♻️ Convert SelectAudioStream into a method of Probe

This commit is contained in:
Dan Jones 2023-09-04 09:09:49 -05:00
commit d87422488c
2 changed files with 20 additions and 21 deletions

View file

@ -9,7 +9,6 @@ import (
"codeberg.org/danjones000/strip-beats/app"
"codeberg.org/danjones000/strip-beats/input/boolean"
"codeberg.org/danjones000/strip-beats/media"
"github.com/spf13/cobra"
)
@ -25,8 +24,8 @@ var rootCmd = &cobra.Command{
// media.Watch(out.Format.Path)
show := boolean.Choose("Show stream?")
if show {
stream := media.SelectAudioStream(out)
fmt.Printf("Stream %d of %s: %+v\n", stream, out.Format.Path, out.Streams[stream])
stream := out.WantedAudioStream()
fmt.Printf("Stream %d of %s: %+v\n", stream.Index, out.Format.Path, stream)
}
},
}