mirror of
https://git.sr.ht/~joren/streamrip-go
synced 2026-06-17 15:05:39 +02:00
Make download dedupe source-specific to prevent cross-provider ID collisions. Also correct non-remaster filtering, avoid FLAC tagging on non-FLAC files, and use album IDs for singles folder templating.
33 lines
666 B
Go
33 lines
666 B
Go
package store
|
|
|
|
import "context"
|
|
|
|
type Database interface {
|
|
IsDownloaded(ctx context.Context, source, id string) (bool, error)
|
|
MarkDownloaded(ctx context.Context, source, id string) error
|
|
MarkFailed(ctx context.Context, source, mediaType, id string) error
|
|
Close() error
|
|
}
|
|
|
|
type Dummy struct{}
|
|
|
|
func NewDummy() *Dummy {
|
|
return &Dummy{}
|
|
}
|
|
|
|
func (d *Dummy) IsDownloaded(context.Context, string, string) (bool, error) {
|
|
return false, nil
|
|
}
|
|
|
|
func (d *Dummy) MarkDownloaded(context.Context, string, string) error {
|
|
return nil
|
|
}
|
|
|
|
func (d *Dummy) MarkFailed(context.Context, string, string, string) error {
|
|
return nil
|
|
}
|
|
|
|
func (d *Dummy) Close() error {
|
|
return nil
|
|
}
|