Use file name as default song name
This commit is contained in:
parent
97cb99eed7
commit
a44abbc5d2
@ -17,6 +17,7 @@ package compiler
|
|||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
|
|
||||||
log "github.com/Sirupsen/logrus"
|
log "github.com/Sirupsen/logrus"
|
||||||
"github.com/jjdekker/ponder/helpers"
|
"github.com/jjdekker/ponder/helpers"
|
||||||
@ -58,6 +59,7 @@ func generateScores() func(string, os.FileInfo) error {
|
|||||||
case ".ly":
|
case ".ly":
|
||||||
log.WithFields(log.Fields{"path": path}).Info("adding lilypond file")
|
log.WithFields(log.Fields{"path": path}).Info("adding lilypond file")
|
||||||
scores = append(scores, &settings.Score{
|
scores = append(scores, &settings.Score{
|
||||||
|
Name: filepath.Base(path)[:strings.LastIndex(filepath.Base(path), ".")],
|
||||||
Path: path,
|
Path: path,
|
||||||
LastModified: file.ModTime(),
|
LastModified: file.ModTime(),
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user