feat(subsonic): add getAlbumInfo with cache
Release-As: 0.16.1
This commit is contained in:
9
db/db.go
9
db/db.go
@@ -574,6 +574,15 @@ func (p *ArtistInfo) SetSimilarArtists(items []string) { p.SimilarArtists = stri
|
||||
func (p *ArtistInfo) GetTopTracks() []string { return strings.Split(p.TopTracks, ";") }
|
||||
func (p *ArtistInfo) SetTopTracks(items []string) { p.TopTracks = strings.Join(items, ";") }
|
||||
|
||||
type AlbumInfo struct {
|
||||
ID int `gorm:"primary_key" sql:"type:int REFERENCES albums(id) ON DELETE CASCADE"`
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time `gorm:"index"`
|
||||
Notes string
|
||||
MusicBrainzID string
|
||||
LastFMURL string
|
||||
}
|
||||
|
||||
func splitIDs(in, sep string) []specid.ID {
|
||||
if in == "" {
|
||||
return []specid.ID{}
|
||||
|
||||
Reference in New Issue
Block a user