release / integration (push) Failing after 58s
release / web (push) Successful in 1m35s
release / govulncheck (push) Successful in 19s
release / go (push) Failing after 2m0s
release / Attach APK to the Release (tag releases only) (push) Canceled after 0s
release / Build + push container image (push) Canceled after 0s
release / Publish the release image to GHCR (dispatch only) (push) Canceled after 0s
release / Verify release artifacts (tag releases only) (push) Canceled after 0s
release / Build signed APK (push) Canceled after 3m28s
release / android (push) Canceled after 4m28s
- lastfm: no key answers transient, not not-found -> TestLastfm_AnswersNotFoundWithoutAsking - deezer: off by default -> TestProviders_IdentityAndDefaults - artist enricher: "none" under older providers is not asked again -> TestEnrichArtist_WhichArtistsAreAsked - artist enricher: a fanart path recorded with no fanart -> TestEnrichArtist_OnePictureOfTwo - getUser: an admin asking about another gets themself -> TestHandleGetUser - decodePassword: enc: not decoded -> TestDecodePassword - router: unknown /rest/ paths get the web app -> TestRouter_TheWebAppAndTheAPIsKeepTheirOwnPaths - genretag: commas no longer split -> TestSplit - api: passwordCost default below bcrypt.DefaultCost -> api's TestMain Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
24 lines
731 B
Go
24 lines
731 B
Go
// Package genretag reads a track's stored genre, one string that can name
|
|
// several genres.
|
|
package genretag
|
|
|
|
import "strings"
|
|
|
|
// Split returns the genres a track's genre string names. Tag editors join
|
|
// several genres with ";" or ","; each piece is trimmed and empty pieces are
|
|
// dropped, so a nil or blank genre gives none. A genre without either
|
|
// separator comes back whole.
|
|
func Split(genre *string) []string {
|
|
if genre == nil {
|
|
return nil
|
|
}
|
|
parts := strings.FieldsFunc(*genre, func(r rune) bool { return r == ';' /* DELIBERATE BREAK: commas no longer split */ })
|
|
out := make([]string, 0, len(parts))
|
|
for _, p := range parts {
|
|
if p = strings.TrimSpace(p); p != "" {
|
|
out = append(out, p)
|
|
}
|
|
}
|
|
return out
|
|
}
|