feat: add lastfm route and workers

This commit is contained in:
axolotlmaid 2024-09-25 19:56:34 +01:00
parent 03d040a18d
commit 4fd340bf22
8 changed files with 128 additions and 1 deletions

27
internal/model/lastfm.go Normal file
View file

@ -0,0 +1,27 @@
package model
type LastFMAPI struct {
RecentTracks struct {
TrackList []struct {
Artist struct {
Text string `json:"#text"`
} `json:"artist"`
Name string `json:"name"`
Image []struct {
Text string `json:"#text"`
} `json:"image"`
Url string `json:"url"`
Attributes *struct {
NowPlaying string `json:"nowplaying"`
} `json:"@attr,omitempty"`
} `json:"track"`
} `json:"recenttracks"`
}
type LastFMData struct {
Song string `json:"song"`
Artist string `json:"artist"`
Image string `json:"image"`
Url string `json:"url"`
Playing bool `json:"playing"`
}