unification

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 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
	ImageURL *string
	Artists  []Artist
}

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
	ImageURL *string
	Added    time.Time
}

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 Playlist

type Playlist struct {
	ID
	Title       string
	Description *string
	ImageURL    *string
}

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
	ImageURL *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
JackTT - Gopher 🇻🇳