add lrc file
This commit is contained in:
parent
fc373764ed
commit
2811de7376
@ -1117,7 +1117,7 @@ func rip(albumId string, token string, storefront string, userToken string) erro
|
|||||||
}
|
}
|
||||||
filename := fmt.Sprintf("%02d. %s.ec3", trackNum, forbiddenNames.ReplaceAllString(track.Attributes.Name, "_"))
|
filename := fmt.Sprintf("%02d. %s.ec3", trackNum, forbiddenNames.ReplaceAllString(track.Attributes.Name, "_"))
|
||||||
m4afilename := fmt.Sprintf("%02d. %s.m4a", trackNum, forbiddenNames.ReplaceAllString(track.Attributes.Name, "_"))
|
m4afilename := fmt.Sprintf("%02d. %s.m4a", trackNum, forbiddenNames.ReplaceAllString(track.Attributes.Name, "_"))
|
||||||
//lrcFilename := fmt.Sprintf("%02d. %s.lrc", trackNum, forbiddenNames.ReplaceAllString(track.Attributes.Name, "_"))
|
lrcFilename := fmt.Sprintf("%02d. %s.lrc", trackNum, forbiddenNames.ReplaceAllString(track.Attributes.Name, "_"))
|
||||||
trackPath := filepath.Join(sanAlbumFolder, filename)
|
trackPath := filepath.Join(sanAlbumFolder, filename)
|
||||||
m4atrackPath := filepath.Join(sanAlbumFolder, m4afilename)
|
m4atrackPath := filepath.Join(sanAlbumFolder, m4afilename)
|
||||||
exists, err := fileExists(trackPath)
|
exists, err := fileExists(trackPath)
|
||||||
@ -1142,6 +1142,11 @@ func rip(albumId string, token string, storefront string, userToken string) erro
|
|||||||
lrc, err = conventTTMLToLRC(ttml)
|
lrc, err = conventTTMLToLRC(ttml)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Failed to parse lyrics: %s \n", err)
|
fmt.Printf("Failed to parse lyrics: %s \n", err)
|
||||||
|
} else {
|
||||||
|
err := writeLyrics(sanAlbumFolder, lrcFilename, lrc)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("Failed to write lyrics")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user