first commit

This commit is contained in:
joren
2026-04-03 21:26:08 +02:00
commit f7805ddfd8
20 changed files with 6033 additions and 0 deletions

53
internal/model/model.go Normal file
View File

@@ -0,0 +1,53 @@
package model
type Track struct {
SourceID string `json:"source_id,omitempty"`
Title string `json:"title"`
Artists []string `json:"artists"`
Album string `json:"album,omitempty"`
DurationMS int `json:"duration_ms,omitempty"`
ISRC string `json:"isrc,omitempty"`
Explicit bool `json:"explicit,omitempty"`
}
type Playlist struct {
SourceID string `json:"source_id,omitempty"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Tracks []Track `json:"tracks"`
}
type Library struct {
UserID string `json:"user_id"`
DisplayName string `json:"display_name"`
Playlists []Playlist `json:"playlists"`
LikedSongs []Track `json:"liked_songs"`
LikedName string `json:"liked_name"`
SourceSystem string `json:"source_system"`
}
type MatchedTrack struct {
Source Track `json:"source"`
QobuzID int64 `json:"qobuz_id,omitempty"`
Score float64 `json:"score"`
Query string `json:"query,omitempty"`
Reason string `json:"reason,omitempty"`
Matched bool `json:"matched"`
}
type PlaylistTransferResult struct {
Name string `json:"name"`
TargetID int64 `json:"target_id,omitempty"`
TotalTracks int `json:"total_tracks"`
MatchedTracks int `json:"matched_tracks"`
AddedTracks int `json:"added_tracks"`
Unmatched []MatchedTrack `json:"unmatched"`
Errors []string `json:"errors"`
}
type TransferReport struct {
StartedAt string `json:"started_at"`
EndedAt string `json:"ended_at"`
DryRun bool `json:"dry_run"`
Results []PlaylistTransferResult `json:"results"`
}