Serve artist placeholder directly, instead of using LastFM's CDN

This commit is contained in:
Deluan
2022-12-30 20:14:03 -05:00
parent b8c171d3d4
commit 6260927074
6 changed files with 79 additions and 12 deletions
+5 -4
View File
@@ -3,21 +3,22 @@ package agents
import (
"context"
"github.com/navidrome/navidrome/consts"
"github.com/navidrome/navidrome/model"
)
const PlaceholderAgentName = "placeholder"
const (
placeholderArtistImageSmallUrl = "https://lastfm.freetls.fastly.net/i/u/64s/2a96cbd8b46e442fc41c2b86b821562f.png"
placeholderArtistImageMediumUrl = "https://lastfm.freetls.fastly.net/i/u/174s/2a96cbd8b46e442fc41c2b86b821562f.png"
placeholderArtistImageLargeUrl = "https://lastfm.freetls.fastly.net/i/u/300x300/2a96cbd8b46e442fc41c2b86b821562f.png"
placeholderArtistImageSmallUrl = consts.URLPathUI + "/artist-placeholder.webp"
placeholderArtistImageMediumUrl = consts.URLPathUI + "/artist-placeholder.webp"
placeholderArtistImageLargeUrl = consts.URLPathUI + "/artist-placeholder.webp"
placeholderBiography = "Biography not available"
)
type placeholderAgent struct{}
func placeholdersConstructor(ds model.DataStore) Interface {
func placeholdersConstructor(_ model.DataStore) Interface {
return &placeholderAgent{}
}