fix: address code review findings

This commit is contained in:
2026-07-19 19:07:20 +03:00
parent a4c426f640
commit c70f46af27
10 changed files with 77 additions and 124 deletions

View File

@@ -6,7 +6,6 @@ import (
"net/url"
"naviwatcher/internal/database"
"naviwatcher/internal/normalize"
)
// excludedStatuses contains release-group statuses that should be filtered out.
@@ -112,20 +111,6 @@ func IsTypeIncluded(releaseType string) bool {
return includedTypes[releaseType]
}
// NormalizeString normalizes a string for fuzzy matching.
// It delegates to the shared normalize package; see normalize.NormalizeString
// for the full normalization contract.
func NormalizeString(s string) string {
return normalize.NormalizeString(s)
}
// NormalizeArtistName normalizes an artist name for comparison.
// It delegates to the shared normalize package; see
// normalize.NormalizeArtistName for the full normalization contract.
func NormalizeArtistName(name string) string {
return normalize.NormalizeArtistName(name)
}
// ToExternalRelease converts a ReleaseGroup to an ExternalRelease for database
// persistence. artistID is the canonical artist key from artist_settings (the
// Navidrome artist ID), which is what external_releases.artist_id references and