Remove dead code: duplicate ExternalRelease/Artist/ParsedArtist structs in model.go, ParseArtist/mbArtist/mbArtistData in client.go, ArtistTypeFilter and related filtering functions in api.go, SyncArtistDiscographyWithFilter in sync.go, and CacheStats/IsArtistCacheValid in cache.go. Fix bugs: SaveExternalRelease now stores NULL instead of empty string for zero CachedAt; sync upserts are now transactional with stale release cleanup; getCachedReleases returns int instead of *CacheStats; doGet uses url.Values for proper query encoding of MBID. Fix tests: removed duplicate TestRun_GracefulShutdown, removed dead code (_ = dbPath) from TestNewApp, fixed assertions in httptest handler goroutine to avoid data race, increased rate limiter timing tolerance, removed Client.Close() calls (no-op removed), fixed sync test cache expiry to use UPDATE instead of 0 TTL races. Fix formatting: cancel()}() formatting in main.go, error format string in sync.go.
22 lines
572 B
Go
22 lines
572 B
Go
package musicbrainz
|
|
|
|
// ReleaseGroup represents a MusicBrainz Release Group entity.
|
|
// This is the primary data model for the provider - we work with
|
|
// Release Groups to minimize duplicates from different releases.
|
|
type ReleaseGroup struct {
|
|
ID string
|
|
Title string
|
|
Type string
|
|
Status string
|
|
ArtistID string
|
|
ArtistName string
|
|
ReleaseDate string
|
|
}
|
|
|
|
// ParsedReleaseGroups holds the result of parsing a MusicBrainz
|
|
// release-group list XML response.
|
|
type ParsedReleaseGroups struct {
|
|
ReleaseGroups []ReleaseGroup
|
|
Count int
|
|
}
|