images

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Embed

type Embed struct {
	// contains filtered or unexported fields
}

Embed provides http album art server from mpd readpicture api.

func NewEmbed

func NewEmbed(httpPrefix string, client *mpd.Client, cacheDir string) (*Embed, error)

NewEmbed initializes Embed Cover Art provider with cacheDir.

func (*Embed) Close

func (s *Embed) Close() error

Close finalizes cache db, coroutines.

func (*Embed) GetURLs

func (s *Embed) GetURLs(song map[string][]string) ([]string, bool)

GetURLs returns cover path for song

func (*Embed) Rescan

func (s *Embed) Rescan(ctx context.Context, song map[string][]string, reqid string) error

Rescan rescans song images.

func (*Embed) ServeHTTP

func (s *Embed) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves local cover art with httpPrefix

func (*Embed) Update

func (s *Embed) Update(ctx context.Context, song map[string][]string) error

Update rescans song images if not indexed.

type Local

type Local struct {
	// contains filtered or unexported fields
}

Local provides http server song conver art from local filesystem.

func NewLocal

func NewLocal(httpPrefix string, dir string, files []string) (*Local, error)

NewLocal creates Local.

func (*Local) GetURLs

func (l *Local) GetURLs(m map[string][]string) ([]string, bool)

GetURLs returns cover path for m

func (*Local) Rescan

func (l *Local) Rescan(ctx context.Context, song map[string][]string, reqid string) error

Rescan rescans song image.

func (*Local) ServeHTTP

func (l *Local) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves cover art with httpPrefix

func (*Local) Update

func (l *Local) Update(ctx context.Context, song map[string][]string) error

Update rescans all songs images.

type Remote

type Remote struct {
	// contains filtered or unexported fields
}

Remote provides http album art server from mpd albumart api.

func NewRemote

func NewRemote(httpPrefix string, client *mpd.Client, cacheDir string) (*Remote, error)

NewRemote initializes Remote with cacheDir.

func (*Remote) Close

func (s *Remote) Close() error

Close finalizes cache db, coroutines.

func (*Remote) GetURLs

func (s *Remote) GetURLs(song map[string][]string) ([]string, bool)

GetURLs returns cover path for song

func (*Remote) Rescan

func (s *Remote) Rescan(ctx context.Context, song map[string][]string, reqid string) error

Rescan rescans song images.

func (*Remote) ServeHTTP

func (s *Remote) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves local cover art with httpPrefix

func (*Remote) Update

func (s *Remote) Update(ctx context.Context, song map[string][]string) error

Update rescans song images if not indexed.

Jump to

Keyboard shortcuts

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