playlist

package
v0.0.0-...-03a5143 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Taken from https://github.com/zmb3/spotify/blob/master/examples/authenticate/authcode/authenticate.go ZMB3 is under an Apache License

Index

Constants

View Source
const TimeoutTime = 30 * time.Second

Variables

This section is empty.

Functions

func CleanupTask

func CleanupTask(playlistID string, config SpotifyConfig, client *spotify.Client)

keep the aggregator playlist under 2500 tracks and remove duplicate songs

func RunAuthServer

func RunAuthServer() (*spotify.Client, error)

func ScanAndAdd

func ScanAndAdd(playlistID string, config SpotifyConfig, client *spotify.Client)

Types

type AggregatorConfig

type AggregatorConfig struct {
	Name        string `yaml:"name"`
	ID          string `yaml:"id"`
	CleanupCron string `yaml:"cleanupCron"`
}

type PlaylistConfig

type PlaylistConfig struct {
	Name     string `yaml:"name"`
	ID       string `yaml:"id"`
	ScanCron string `yaml:"scanCron"`
}

type SpotifyConfig

type SpotifyConfig struct {
	Aggregator AggregatorConfig `yaml:"aggregator"`
	Playlists  []PlaylistConfig `yaml:"playlists"`
}

func LoadConfig

func LoadConfig() SpotifyConfig

Jump to

Keyboard shortcuts

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