mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-30 21:57:06 +02:00
ListenBrainz: Love export and basic import
Love import currently works only for tracks with existing recording MBID
This commit is contained in:
parent
ead323eaed
commit
0020594ea3
6 changed files with 300 additions and 4 deletions
|
@ -52,6 +52,41 @@ type Track struct {
|
|||
ArtistName string `json:"artist_name"`
|
||||
ReleaseName string `json:"release_name"`
|
||||
AdditionalInfo map[string]any `json:"additional_info"`
|
||||
MbidMapping MbidMapping `json:"mbid_mapping"`
|
||||
}
|
||||
|
||||
type MbidMapping struct {
|
||||
RecordingName string `json:"recording_name"`
|
||||
RecordingMbid string `json:"recording_mbid"`
|
||||
ReleaseMbid string `json:"release_mbid"`
|
||||
ArtistMbids []string `json:"artist_mbids"`
|
||||
Artists []Artist `json:"artists"`
|
||||
}
|
||||
|
||||
type Artist struct {
|
||||
ArtistCreditName string `json:"artist_credit_name"`
|
||||
ArtistMbid string `json:"artist_mbid"`
|
||||
JoinPhrase string `json:"join_phrase"`
|
||||
}
|
||||
|
||||
type GetFeedbackResult struct {
|
||||
Count int `json:"count"`
|
||||
TotalCount int `json:"total_count"`
|
||||
Offset int `json:"offset"`
|
||||
Feedback []Feedback `json:"feedback"`
|
||||
}
|
||||
|
||||
type Feedback struct {
|
||||
Created int64 `json:"created"`
|
||||
RecordingMbid string `json:"recording_mbid"`
|
||||
RecordingMsid string `json:"recording_msid"`
|
||||
Score int `json:"score"`
|
||||
TrackMetadata Track `json:"track_metadata"`
|
||||
UserName string `json:"user_id"`
|
||||
}
|
||||
|
||||
type StatusResult struct {
|
||||
Status string `json:"status"`
|
||||
}
|
||||
|
||||
func (t Track) Duration() time.Duration {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue