mirror of
https://github.com/navidrome/navidrome.git
synced 2026-03-04 06:35:52 +00:00
* refactor: rename ArtistRadio to SimilarSongs for clarity and consistency Signed-off-by: Deluan <deluan@navidrome.org> * feat: implement GetSimilarSongsByTrack and related functionality for song similarity retrieval Signed-off-by: Deluan <deluan@navidrome.org> * feat: enhance GetSimilarSongsByTrack to include artist and album details and update tests Signed-off-by: Deluan <deluan@navidrome.org> * feat: enhance song matching by implementing title and artist filtering in loadTracksByTitleAndArtist Signed-off-by: Deluan <deluan@navidrome.org> * test: add unit tests for song matching functionality in provider Signed-off-by: Deluan <deluan@navidrome.org> * refactor: extract song matching functionality into its own file Signed-off-by: Deluan <deluan@navidrome.org> * docs: clarify similarSongsFallback function description in provider.go Signed-off-by: Deluan <deluan@navidrome.org> * refactor: initialize result slice for songs with capacity based on response length Signed-off-by: Deluan <deluan@navidrome.org> * refactor: simplify agent method calls for retrieving images and similar songs Signed-off-by: Deluan <deluan@navidrome.org> * refactor: simplify agent method calls for retrieving images and similar songs Signed-off-by: Deluan <deluan@navidrome.org> * refactor: remove outdated comments in GetSimilarSongs methods Signed-off-by: Deluan <deluan@navidrome.org> * fix: use composite key for song matches to handle duplicates by title and artist Signed-off-by: Deluan <deluan@navidrome.org> * refactor: consolidate expectations setup for similar songs tests Signed-off-by: Deluan <deluan@navidrome.org> * feat: add instant mix action to song context menu and update translations Signed-off-by: Deluan <deluan@navidrome.org> * fix(provider): handle unknown entity types in GetSimilarSongs Signed-off-by: Deluan <deluan@navidrome.org> * refactor: move playSimilar action to playbackActions and streamline song processing Signed-off-by: Deluan <deluan@navidrome.org> * format Signed-off-by: Deluan <deluan@navidrome.org> * feat: enhance instant mix functionality with loading notification and shuffle option Signed-off-by: Deluan <deluan@navidrome.org> * feat: implement fuzzy matching for similar songs based on configurable threshold Signed-off-by: Deluan <deluan@navidrome.org> * refactor: implement track matching with multiple specificity levels Signed-off-by: Deluan <deluan@navidrome.org> * refactor: enhance track matching by implementing unified scoring with specificity levels Signed-off-by: Deluan <deluan@navidrome.org> * feat: enhance deezer top tracks result with album Signed-off-by: Deluan <deluan@navidrome.org> * feat: enhance track matching with fuzzy album similarity for improved scoring Signed-off-by: Deluan <deluan@navidrome.org> * docs: document multi-phase song matching algorithm with detailed scoring and prioritization Signed-off-by: Deluan <deluan@navidrome.org> --------- Signed-off-by: Deluan <deluan@navidrome.org>
143 lines
3.4 KiB
Go
143 lines
3.4 KiB
Go
package lastfm
|
|
|
|
type Response struct {
|
|
Artist Artist `json:"artist"`
|
|
SimilarArtists SimilarArtists `json:"similarartists"`
|
|
TopTracks TopTracks `json:"toptracks"`
|
|
Album Album `json:"album"`
|
|
SimilarTracks SimilarTracks `json:"similartracks"`
|
|
Error int `json:"error"`
|
|
Message string `json:"message"`
|
|
Token string `json:"token"`
|
|
Session Session `json:"session"`
|
|
NowPlaying NowPlaying `json:"nowplaying"`
|
|
Scrobbles Scrobbles `json:"scrobbles"`
|
|
}
|
|
|
|
type Album struct {
|
|
Name string `json:"name"`
|
|
MBID string `json:"mbid"`
|
|
URL string `json:"url"`
|
|
Image []ExternalImage `json:"image"`
|
|
Description Description `json:"wiki"`
|
|
}
|
|
|
|
type Artist struct {
|
|
Name string `json:"name"`
|
|
MBID string `json:"mbid"`
|
|
URL string `json:"url"`
|
|
Image []ExternalImage `json:"image"`
|
|
Bio Description `json:"bio"`
|
|
}
|
|
|
|
type SimilarArtists struct {
|
|
Artists []Artist `json:"artist"`
|
|
Attr Attr `json:"@attr"`
|
|
}
|
|
|
|
type Attr struct {
|
|
Artist string `json:"artist"`
|
|
}
|
|
|
|
type ExternalImage struct {
|
|
URL string `json:"#text"`
|
|
Size string `json:"size"`
|
|
}
|
|
|
|
type Description struct {
|
|
Published string `json:"published"`
|
|
Summary string `json:"summary"`
|
|
Content string `json:"content"`
|
|
}
|
|
|
|
type Track struct {
|
|
Name string `json:"name"`
|
|
MBID string `json:"mbid"`
|
|
}
|
|
|
|
type TopTracks struct {
|
|
Track []Track `json:"track"`
|
|
Attr Attr `json:"@attr"`
|
|
}
|
|
|
|
type SimilarTracks struct {
|
|
Track []SimilarTrack `json:"track"`
|
|
Attr SimilarAttr `json:"@attr"`
|
|
}
|
|
|
|
type SimilarTrack struct {
|
|
Name string `json:"name"`
|
|
MBID string `json:"mbid"`
|
|
Match float64 `json:"match"`
|
|
Artist SimilarTrackArtist `json:"artist"`
|
|
}
|
|
|
|
type SimilarTrackArtist struct {
|
|
Name string `json:"name"`
|
|
MBID string `json:"mbid"`
|
|
}
|
|
|
|
type SimilarAttr struct {
|
|
Artist string `json:"artist"`
|
|
Track string `json:"track"`
|
|
}
|
|
|
|
type Session struct {
|
|
Name string `json:"name"`
|
|
Key string `json:"key"`
|
|
Subscriber int `json:"subscriber"`
|
|
}
|
|
|
|
type NowPlaying struct {
|
|
Artist struct {
|
|
Corrected string `json:"corrected"`
|
|
Text string `json:"#text"`
|
|
} `json:"artist"`
|
|
IgnoredMessage struct {
|
|
Code string `json:"code"`
|
|
Text string `json:"#text"`
|
|
} `json:"ignoredMessage"`
|
|
Album struct {
|
|
Corrected string `json:"corrected"`
|
|
Text string `json:"#text"`
|
|
} `json:"album"`
|
|
AlbumArtist struct {
|
|
Corrected string `json:"corrected"`
|
|
Text string `json:"#text"`
|
|
} `json:"albumArtist"`
|
|
Track struct {
|
|
Corrected string `json:"corrected"`
|
|
Text string `json:"#text"`
|
|
} `json:"track"`
|
|
}
|
|
|
|
type Scrobbles struct {
|
|
Attr struct {
|
|
Accepted int `json:"accepted"`
|
|
Ignored int `json:"ignored"`
|
|
} `json:"@attr"`
|
|
Scrobble struct {
|
|
Artist struct {
|
|
Corrected string `json:"corrected"`
|
|
Text string `json:"#text"`
|
|
} `json:"artist"`
|
|
IgnoredMessage struct {
|
|
Code string `json:"code"`
|
|
Text string `json:"#text"`
|
|
} `json:"ignoredMessage"`
|
|
AlbumArtist struct {
|
|
Corrected string `json:"corrected"`
|
|
Text string `json:"#text"`
|
|
} `json:"albumArtist"`
|
|
Timestamp string `json:"timestamp"`
|
|
Album struct {
|
|
Corrected string `json:"corrected"`
|
|
Text string `json:"#text"`
|
|
} `json:"album"`
|
|
Track struct {
|
|
Corrected string `json:"corrected"`
|
|
Text string `json:"#text"`
|
|
} `json:"track"`
|
|
} `json:"scrobble"`
|
|
}
|