library

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CacheDir string

Functions

func CacheSong

func CacheSong(ctx context.Context, u url.URL, user, token, salt string, id string) error

func DecodeSong

func DecodeSong(ctx context.Context, songID string, offset time.Duration) (io.ReadCloser, error)

DecodeSong decodes the file at path, producing 48kHz stereo PCM (WAV) on the returned reader. The caller must Close() the returned ReadCloser when done, even on early exit, to release the process and any associated resources.

offset can be given to start decoding after the beginning of a song.

func FetchAllSongs

func FetchAllSongs(cfg config.Config) ([]song.Song, error)

func FetchSimilarSongs

func FetchSimilarSongs(ctx context.Context, cfg config.Config, songID string) ([]song.Song, error)

func Scrobble

func Scrobble(cfg config.Config, songID string, submission bool) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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