|
|
|
@ -1110,6 +1110,7 @@ func rip(albumId string, token string, storefront string, userToken string) erro |
|
|
|
|
continue |
|
|
|
|
} |
|
|
|
|
filename := fmt.Sprintf("%02d. %s.m4a", trackNum, forbiddenNames.ReplaceAllString(track.Attributes.Name, "_")) |
|
|
|
|
lrcFilename := fmt.Sprintf("%02d. %s.lrc", trackNum, forbiddenNames.ReplaceAllString(track.Attributes.Name, "_")) |
|
|
|
|
trackPath := filepath.Join(sanAlbumFolder, filename) |
|
|
|
|
var lrc string = "" |
|
|
|
|
if userToken != "" { |
|
|
|
@ -1120,6 +1121,11 @@ func rip(albumId string, token string, storefront string, userToken string) erro |
|
|
|
|
lrc, err = conventTTMLToLRC(ttml) |
|
|
|
|
if err != nil { |
|
|
|
|
fmt.Printf("Failed to parse lyrics: %s \n", err) |
|
|
|
|
} else { |
|
|
|
|
err := writeLyrics(sanAlbumFolder, lrcFilename, lrc) |
|
|
|
|
if err != nil { |
|
|
|
|
fmt.Printf("Failed to write lyrics") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|