Documentation
¶
Index ¶
- func MakeRatelimit(amount int, interval time.Duration) <-chan struct{}
- type Backend
- type BackendBuilder
- type Config
- type DI
- func (di *DI) AcoustID() *acoustid.Client
- func (di *DI) Backend() Backend
- func (di *DI) BackendAvailable() (string, error)
- func (di *DI) BaseUI() ui.UI
- func (di *DI) Collection() *collection.Collection
- func (di *DI) CommandParser() *ui.CommandParser
- func (di *DI) Log() *log.Logger
- func (di *DI) MPVFlags() []string
- func (di *DI) Player() *player.Player
- func (di *DI) Queue() *collection.Queue
- func (di *DI) Rates() (<-chan struct{}, <-chan struct{})
- func (di *DI) Store() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeRatelimit ¶
MakeRateLimit creates and starts a ratelimiter that can be used in Config.
Types ¶
type BackendBuilder ¶
type Config ¶
type Config struct { // Defaults to an stderr logger Log *log.Logger // Defaults to 8 ConcurrentDownloads int // Defaults to ~/.cache/ym StorePath string // Default to ~/.cache/ym/mpv-ipc.sock if not compiled with libmpv SocketPath string // Extra mpv flags when using RPC MPVFlags []string // Defaults to os.Stderr BackendLogger io.Writer AutoSave bool // Mutually exclusive with CustomOutput. SimpleOutput io.Writer // Mutually exclusive with SimpleOutput. CustomOutput ui.Output CustomError ui.ErrorReporter // Ratelimit ratelimits youtube.com calls by pulling items for the given // channels before each action. // If nil, a default ratelimiter of 1 item every 5 seconds is used for each. RatelimitDownloads <-chan struct{} RatelimitMeta <-chan struct{} // AcoustID config AcoustID acoustid.Config }
type DI ¶
type DI struct {
// contains filtered or unexported fields
}
func (*DI) BackendAvailable ¶
func (*DI) Collection ¶
func (di *DI) Collection() *collection.Collection
func (*DI) CommandParser ¶
func (di *DI) CommandParser() *ui.CommandParser
func (*DI) Queue ¶
func (di *DI) Queue() *collection.Queue
Click to show internal directories.
Click to hide internal directories.