config

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteConfig

func WriteConfig(path string, config *Config) error

Types

type Config

type Config struct {
	General GeneralConfig
	Spotify SpotifyConfig
	VRChat  VRChatConfig
}

func ParseConfig

func ParseConfig(path string) (config *Config, err error)

type GeneralConfig added in v1.0.3

type GeneralConfig struct {
	// Lyrics update rate
	UpdateRate int
}

type SpotifyConfig

type SpotifyConfig struct {
	// SP_DC cookie from the open.spotify.com, which will be used to get the token
	SPDCCookie string

	// A token that will be used to access the spotify API. This is automatically set using the SP_DC cookie. **Do not change**.
	Token *spotify.Token
}

type VRChatConfig

type VRChatConfig struct {
	// Connection data for VRChat's OSC
	OSCHost string
	OSCPort int

	// OSC Ratelimit (milliseconds per message)
	Ratelimit int

	// The formatted string that will be displayed if there **are lyrics** in the current track
	// Available fields: {{.artist}}, {{.name}}, {{.line}}, {{.trackID}}
	LyricsFormat string

	// Formatted string that will be displayed if there are **no lyrics** in the track
	// Available fields: {{.artist}}, {{.name}}, {{.trackID}}
	NoLyricsFormat string

	// Formatted string that will be displayed if track is paused
	// Available fields: {{.artist}}, {{.name}}, {{.trackID}}
	PausedFormat string
}

Jump to

Keyboard shortcuts

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