This commit is contained in:
429Enjoyer
2026-05-20 05:56:51 +07:00
parent 254022d81d
commit 0c3a7b70af
460 changed files with 51905 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
package backend
import "strings"
func ResolveTrackISRC(spotifyTrackID string) string {
spotifyTrackID = strings.TrimSpace(spotifyTrackID)
if spotifyTrackID == "" {
return ""
}
if cachedISRC, err := GetCachedISRC(spotifyTrackID); err == nil && cachedISRC != "" {
return strings.ToUpper(strings.TrimSpace(cachedISRC))
}
client := NewSongLinkClient()
isrc, err := client.GetISRCDirect(spotifyTrackID)
if err != nil {
return ""
}
return strings.ToUpper(strings.TrimSpace(isrc))
}