mirror of
https://git.sr.ht/~joren/streamrip-go
synced 2026-06-17 15:05:39 +02:00
32 lines
699 B
Go
32 lines
699 B
Go
package provider
|
|
|
|
import "context"
|
|
|
|
type Downloadable struct {
|
|
URL string
|
|
Extension string
|
|
Source string
|
|
Cipher string
|
|
TrackID string
|
|
Audio AudioProfile
|
|
}
|
|
|
|
type AudioProfile struct {
|
|
Container string
|
|
Codec string
|
|
Quality string
|
|
BitDepth int
|
|
SamplingRate string
|
|
BitrateKbps int
|
|
}
|
|
|
|
type Client interface {
|
|
Source() string
|
|
Login(ctx context.Context) error
|
|
LoggedIn() bool
|
|
GetMetadata(ctx context.Context, item, mediaType string) (map[string]any, error)
|
|
Search(ctx context.Context, mediaType, query string, limit int) ([]map[string]any, error)
|
|
GetDownloadable(ctx context.Context, item string, quality int) (*Downloadable, error)
|
|
Close() error
|
|
}
|