mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-16 04:00:38 +03:00
Fix lint errors
This commit is contained in:
parent
877cdf1d5c
commit
365dff6435
@ -67,7 +67,7 @@ var _ = Describe("CachedHttpClient", func() {
|
||||
body, err = ioutil.ReadAll(resp.Body)
|
||||
Expect(err).To(BeNil())
|
||||
Expect(string(body)).To(Equal("Hello, []"))
|
||||
Expect(string(header)).To(Equal("this is a header"))
|
||||
Expect(header).To(Equal("this is a header"))
|
||||
Expect(requestsReceived).To(Equal(3))
|
||||
})
|
||||
|
||||
|
@ -56,7 +56,6 @@ func (l *lastfmAgent) GetURL(name, mbid string) (string, error) {
|
||||
return "", ErrNotFound
|
||||
}
|
||||
return a.URL, nil
|
||||
|
||||
}
|
||||
|
||||
func (l *lastfmAgent) GetBiography(name, mbid string) (string, error) {
|
||||
|
@ -65,13 +65,12 @@ func (e *externalInfo2) UpdateArtistInfo(ctx context.Context, id string, similar
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// TODO Uncomment
|
||||
// If we have fresh info, just return it
|
||||
//if time.Since(artist.ExternalInfoUpdatedAt) < consts.ArtistInfoTimeToLive {
|
||||
// log.Debug("Found cached ArtistInfo", "updatedAt", artist.ExternalInfoUpdatedAt, "name", artist.Name)
|
||||
// err := e.loadSimilar(ctx, artist, includeNotPresent)
|
||||
// return artist, err
|
||||
//}
|
||||
if time.Since(artist.ExternalInfoUpdatedAt) < time.Second { //consts.ArtistInfoTimeToLive {
|
||||
log.Debug("Found cached ArtistInfo", "updatedAt", artist.ExternalInfoUpdatedAt, "name", artist.Name)
|
||||
err := e.loadSimilar(ctx, artist, includeNotPresent)
|
||||
return artist, err
|
||||
}
|
||||
log.Debug(ctx, "ArtistInfo not cached", "updatedAt", artist.ExternalInfoUpdatedAt, "id", id, "name", artist.Name)
|
||||
|
||||
wg := &sync.WaitGroup{}
|
||||
|
Loading…
x
Reference in New Issue
Block a user