Select audio stream

This commit is contained in:
Dan Jones 2023-08-29 20:18:27 -05:00
commit 07b2c00c14
3 changed files with 95 additions and 5 deletions

View file

@ -10,11 +10,14 @@ import (
)
type Config struct {
Source string `toml:"source"`
SourceExtensions []string `toml:"source_ext"`
Recurse bool `toml:"recurse"`
SavePath string `toml:"save_path"`
MusicPath string `toml:"music_path"`
Source string `toml:"source"`
SourceExtensions []string `toml:"source_ext"`
Recurse bool `toml:"recurse"`
SavePath string `toml:"save_path"`
MusicPath string `toml:"music_path"`
Codec string `toml:"codec"`
AllowedCodecs []string `toml:"allowed_codec"`
CodecExt map[string]string `toml:"codec_ext"`
}
var config Config
@ -26,6 +29,9 @@ func newConfig() Config {
Recurse: true,
SavePath: filepath.Join(xdg.UserDirs.Documents, "StripBeats"),
MusicPath: xdg.UserDirs.Music,
Codec: "opus",
AllowedCodecs: []string{"aac", "opus"},
CodecExt: map[string]string{"aac": "m4a", "opus": "opus"},
}
}