We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa80b44 commit c2cc012Copy full SHA for c2cc012
1 file changed
src/config/config.go
@@ -175,10 +175,16 @@ func (cfg *Config) ReadEnv() {
175
}
176
177
178
- cfg.VerifyDir()
+ cfg.CommonFixes()
179
180
181
-func (cfg *Config) VerifyDir() {
+func (cfg *Config) CommonFixes() {
182
+ cfg.DownloadCfg.Youtube.FileExtension = strings.TrimPrefix(cfg.DownloadCfg.Youtube.FileExtension, ".")
183
+ cfg.ClientCfg.URL = strings.TrimSuffix(cfg.ClientCfg.URL, "/")
184
+ cfg.NormalizeDir()
185
+}
186
+
187
+func (cfg *Config) NormalizeDir() {
188
if cfg.System == "mpd" {
189
cfg.ClientCfg.PlaylistDir = fixDir(cfg.ClientCfg.PlaylistDir)
190
0 commit comments