unification

package
v0.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2025 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Album

type Album struct {
	ID

	Title   string
	Release *time.Time
	Added   *time.Time
	Artists []Artist
	ImageID *ImageID
}

func MergeAlbums

func MergeAlbums(streaming []Album, lib []Album) (res []Album)

type AlbumDisc

type AlbumDisc struct {
	Tracks []Track
}

type AlbumFull

type AlbumFull struct {
	Album Album
	Discs []AlbumDisc
}

type Artist

type Artist struct {
	ID

	Title   string
	Added   time.Time
	ImageID *ImageID
}

func MergeArtists

func MergeArtists(streaming []Artist, lib []Artist) (res []Artist)

type ArtistFull

type ArtistFull struct {
	Artist        Artist
	PopularTracks []Track
	InLibrary     []Album
	Albums        []Album
	SingleAndEPs  []Album
	Appearances   []Album
}

type ID

type ID struct {
	LibID       *uuid.UUID
	StreamingID *string
}

func (*ID) ToLog

func (i *ID) ToLog() []any

type ImageID added in v0.3.0

type ImageID struct {
	LibID *uuid.UUID
	URL   *string
}

func (*ImageID) ToLog added in v0.3.0

func (i *ImageID) ToLog() []any

type Playlist

type Playlist struct {
	ID

	Title       string
	Description *string
	ImageID     *ImageID
}

type PlaylistFull

type PlaylistFull struct {
	Playlist Playlist
	Tracks   []Track
}

type SearchRes

type SearchRes struct {
	Library   SourceRes
	Streaming SourceRes
}

type SourceRes

type SourceRes struct {
	Artists []Artist
	Albums  []Album
	Tracks  []Track
}

type Track

type Track struct {
	ID

	Title    string
	Duration time.Duration
	Num      int
	Album    Album
	Artists  []Artist
}

func MergeTracks

func MergeTracks(streaming []Track, lib []Track) (res []Track)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL