library

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOrCreateAlbum

func GetOrCreateAlbum(queries *database.Queries, album *Album, artistId string) (database.Album, error)

func GetOrCreateArtist

func GetOrCreateArtist(queries *database.Queries, artist *Artist) (database.Artist, error)

func GetOrCreateTrack

func GetOrCreateTrack(queries *database.Queries, track *Track, albumId string, artistId string) (database.Track, error)

Types

type Album

type Album struct {
	Path       string
	Name       string
	ArtistName string
	Tracks     []Track
}

type Artist

type Artist struct {
	Path        string
	Name        string
	PicturePath string
	Albums      []Album
}

type Library

type Library struct {
	Artists map[string]*Artist
}

func ReadFromFS

func ReadFromFS(fsys fs.FS) (*Library, error)

func (*Library) Sync

func (lib *Library) Sync(workDir types.WorkDir, dir string, db *pgxpool.Pool) error

type Track

type Track struct {
	Path   string
	Name   string
	Number int
}

Jump to

Keyboard shortcuts

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