config

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigPath

func GetConfigPath() (string, error)

GetConfigPath returns the path to the configuration file

func GetDataDir

func GetDataDir() (string, error)

GetDataDir returns the path to the data directory

func Save

func Save(cfg *Config) error

Save writes the configuration to the INI file

Types

type AdvancedConfig

type AdvancedConfig struct {
	ShowAdultContent bool `ini:"show_adult_content"`
}

AdvancedConfig contains advanced settings

type AniListConfig

type AniListConfig struct {
	NoAniList         bool `ini:"no_anilist"`
	ScoreOnCompletion bool `ini:"score_on_completion"`
}

AniListConfig contains AniList integration settings

type Config

type Config struct {
	Player   PlayerConfig   `ini:"player"`
	Provider ProviderConfig `ini:"provider"`
	AniList  AniListConfig  `ini:"anilist"`
	UI       UIConfig       `ini:"ui"`
	Playback PlaybackConfig `ini:"playback"`
	Discord  DiscordConfig  `ini:"discord"`
	Advanced AdvancedConfig `ini:"advanced"`
}

Config represents the complete application configuration

func Load

func Load() (*Config, error)

Load reads the configuration from the INI file

type DiscordConfig

type DiscordConfig struct {
	DiscordPresence bool `ini:"discord_presence"`
}

DiscordConfig contains Discord presence settings

type PlaybackConfig

type PlaybackConfig struct {
	SubOrDub                 string `ini:"sub_or_dub"`
	SubsLanguage             string `ini:"subs_language"`
	PersistIncognitoSessions bool   `ini:"persist_incognito_sessions"`
}

PlaybackConfig contains playback-related settings

type PlayerConfig

type PlayerConfig struct {
	Player          string `ini:"player"`
	PlayerArguments string `ini:"player_arguments"`
}

PlayerConfig contains player-related settings

type ProviderConfig

type ProviderConfig struct {
	Provider    string `ini:"provider"`
	DownloadDir string `ini:"download_dir"`
	Quality     string `ini:"quality"`
}

ProviderConfig contains provider-related settings

type UIConfig

type UIConfig struct {
	UseExternalMenu bool `ini:"use_external_menu"`
	ImagePreview    bool `ini:"image_preview"`
	JSONOutput      bool `ini:"json_output"`
}

UIConfig contains UI-related settings

Jump to

Keyboard shortcuts

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