add mp3 file extension
This commit is contained in:
parent
1897aa3153
commit
55a7cdc36f
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
.env
|
||||
music-library
|
4
main.go
4
main.go
@ -65,8 +65,8 @@ func main() {
|
||||
}
|
||||
|
||||
func TranscodeFile(file string) error {
|
||||
relPath := strings.TrimPrefix(file, FlagSourceDir)
|
||||
newPath := filepath.Join(FlagTargetDir, relPath)
|
||||
relPath := strings.TrimPrefix(file[:len(file)-len(filepath.Ext(file))], FlagSourceDir)
|
||||
newPath := filepath.Join(FlagTargetDir, relPath+".mp3")
|
||||
newDir := filepath.Dir(newPath)
|
||||
|
||||
fmt.Printf("check '%s'\n", relPath)
|
||||
|
Loading…
Reference in New Issue
Block a user