config

package
v0.1.102 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// TraktReadClientID ...
	TraktReadClientID = "eb8839a79fb2af4ebfb93f993a8a539abd4d9674a7638497bbc662d2a4b22346"
	// TraktReadClientSecret ...
	TraktReadClientSecret = "338cfda318c5879c9d7d0888bf1875e303576d4ad7e72a2230addf5db326c791"
	// TraktWriteClientID ...
	TraktWriteClientID = "66f7807c55e9fec2d6627846baf8bc667a5e82620b6e037a044034c64e3cb5e2"
	// TraktWriteClientSecret ...
	TraktWriteClientSecret = "5d37802b559c17a8dc10daaf96c55b196b1c86a723e6667310556288b3cac7fb"
)
View Source
const (
	// StorageFile ...
	StorageFile int = iota
	// StorageMemory ...
	StorageMemory
)
View Source
const (
	ImageQualityOriginal int = iota
	ImageQualityHigh
	ImageQualityMedium
	ImageQualityLow
)

Variables

View Source
var (
	// Args for cli arguments parsing
	Args = struct {
		EnableRequestTracing  bool `help:"Enable ReqAPI tracing"`
		EnableDatabaseTracing bool `help:"Enable database tracing"`
		EnableCacheTracing    bool `help:"Enable cache tracing"`

		DisableCache    bool `help:"Disable caching for get/set methods"`
		DisableCacheGet bool `help:"Disable caching for get methods"`
		DisableCacheSet bool `help:"Disable caching for set methods"`
		DisableBackup   bool `help:"Disable database backup"`

		RemoteHost string `help:"Remote host IP or Hostname (Host with plugin.video.elementum running)"`
		RemotePort int    `help:"Remote host Port (Host with plugin.video.elementum running)"`

		LocalHost     string `help:"Local host IP (IP that would be used for running Elementum HTTP server on a local host)"`
		LocalPort     int    `help:"Local host Port (Port that would be used for running Elementum HTTP server on a local host)"`
		LocalLogin    string `help:"Local host Login (To use for authentication from plugin.video.elementum calls)"`
		LocalPassword string `help:"Local host Password (To use for authentication from plugin.video.elementum calls)"`

		LogPath string `help:"Log location path"`

		ConfigPath     string `help:"Custom path to Elementum config (Yaml or JSON format)"`
		AddonPath      string `help:"Custom path to addon folder (where Kodi stored files, coming with addon zip)"`
		ProfilePath    string `help:"Custom path to addon files folder (where Elementum will write data)"`
		LibraryPath    string `help:"Custom path to addon library folder"`
		TorrentsPath   string `help:"Custom path to addon torrent files folder"`
		DownloadsPath  string `help:"Custom path to addon downloads folder"`
		MoveMoviesPath string `help:"Custom path to addon folder, used for moving completed Movie downloads"`
		MoveShowsPath  string `help:"Custom path to addon folder, used for moving completed Show downloads"`

		ExportConfig string `help:"Export current configuration, taken from Kodi into a file. Should end with json or yml suffix"`
	}{
		RemotePort: 65221,
		LocalPort:  65220,
	}
)
View Source
var (
	// Storages ...
	Storages = []string{
		"File",
		"Memory",
	}
)

Functions

func AddonIcon

func AddonIcon() string

AddonIcon ...

func AddonResource

func AddonResource(args ...string) string

AddonResource ...

func GetStrmLanguage

func GetStrmLanguage() string

func TranslatePath

func TranslatePath(xbmcHost *xbmc.XBMCHost, path string) string

TranslatePath ...

Types

type Addon

type Addon struct {
	ID      string
	Name    string
	Version string
	Enabled bool
}

Addon ...

type ConfigBundle

type ConfigBundle struct {
	Info           *xbmc.AddonInfo
	Platform       *xbmc.Platform
	Settings       XbmcSettings
	Language       string
	SecondLanguage string
	Region         string
}

type ConfigFormat

type ConfigFormat string
const (
	JSONConfigFormat ConfigFormat = "json"
	YamlConfigFormat ConfigFormat = "yaml"
)

type Configuration

type Configuration struct {
	DownloadPath                string
	TorrentsPath                string
	LibraryPath                 string
	Info                        *xbmc.AddonInfo
	Platform                    *xbmc.Platform
	Language                    string
	SecondLanguage              string
	Region                      string
	TemporaryPath               string
	ProfilePath                 string
	HomePath                    string
	XbmcPath                    string
	SpoofUserAgent              int
	DownloadFileStrategy        int
	KeepDownloading             int
	KeepFilesPlaying            int
	KeepFilesFinished           int
	UseTorrentHistory           bool
	TorrentHistorySize          int
	UseFanartTv                 bool
	DisableBgProgress           bool
	DisableBgProgressPlayback   bool
	ForceUseTrakt               bool
	UseCacheSelection           bool
	UseCacheSearch              bool
	UseCacheTorrents            bool
	CacheSearchDuration         int
	ShowFilesWatched            bool
	ResultsPerPage              int
	GreetingEnabled             bool
	EnableOverlayStatus         bool
	SilentStreamStart           bool
	AutoYesEnabled              bool
	AutoYesTimeout              int
	ChooseStreamAutoMovie       bool
	ChooseStreamAutoShow        bool
	ChooseStreamAutoSearch      bool
	ForceLinkType               bool
	AddSpecials                 bool
	AddEpisodeNumbers           bool
	ShowUnairedSeasons          bool
	ShowUnairedEpisodes         bool
	ShowEpisodesOnReleaseDay    bool
	ShowUnwatchedEpisodesNumber bool
	ShowSeasonsAll              bool
	ShowSeasonsOrder            int
	ShowSeasonsSpecials         bool
	SmartEpisodeStart           bool
	SmartEpisodeMatch           bool
	SmartEpisodeChoose          bool
	LibraryEnabled              bool
	LibrarySyncEnabled          bool
	LibrarySyncPlaybackEnabled  bool
	LibraryUpdate               int
	StrmLanguage                string
	LibraryNFOMovies            bool
	LibraryNFOShows             bool
	PlaybackPercent             int
	DownloadStorage             int
	SkipBurstSearch             bool
	SkipRepositorySearch        bool
	AutoMemorySize              bool
	AutoKodiBufferSize          bool
	AutoAdjustMemorySize        bool
	AutoMemorySizeStrategy      int
	MemorySize                  int
	AutoAdjustBufferSize        bool
	MinCandidateSize            int64
	MinCandidateShowSize        int64
	BufferTimeout               int
	BufferSize                  int
	EndBufferSize               int
	KodiBufferSize              int
	UploadRateLimit             int
	DownloadRateLimit           int
	AutoloadTorrents            bool
	AutoloadTorrentsPaused      bool
	LimitAfterBuffering         bool
	ConnectionsLimit            int
	ConnTrackerLimit            int
	ConnTrackerLimitAuto        bool
	SessionSave                 int

	SeedForever        bool
	ShareRatioLimit    int
	SeedTimeRatioLimit int
	SeedTimeLimit      int

	DisableUpload            bool
	DisableLSD               bool
	DisableDHT               bool
	DisableTCP               bool
	DisableUTP               bool
	DisableUPNP              bool
	EncryptionPolicy         int
	ListenPortMin            int
	ListenPortMax            int
	ListenInterfaces         string
	ListenAutoDetectIP       bool
	ListenAutoDetectPort     bool
	OutgoingInterfaces       string
	TunedStorage             bool
	DiskCacheSize            int
	UseLibtorrentConfig      bool
	UseLibtorrentLogging     bool
	UseLibtorrentDeadlines   bool
	UseLibtorrentPauseResume bool
	LibtorrentProfile        int
	MagnetResolveTimeout     int
	AddExtraTrackers         int
	RemoveOriginalTrackers   bool
	ModifyTrackersStrategy   int
	Scrobble                 bool

	TraktAuthorized                bool
	TraktUsername                  string
	TraktToken                     string
	TraktRefreshToken              string
	TraktTokenExpiry               int64
	TraktSyncEnabled               bool
	TraktSyncPlaybackEnabled       bool
	TraktSyncFrequencyMin          int
	TraktSyncCollections           bool
	TraktSyncWatchlist             bool
	TraktSyncUserlists             bool
	TraktSyncPlaybackProgress      bool
	TraktSyncHidden                bool
	TraktSyncWatched               bool
	TraktSyncWatchedBack           bool
	TraktSyncAddedMovies           bool
	TraktSyncAddedMoviesLocation   int
	TraktSyncAddedMoviesList       int
	TraktSyncAddedShows            bool
	TraktSyncAddedShowsLocation    int
	TraktSyncAddedShowsList        int
	TraktSyncRemovedMovies         bool
	TraktSyncRemovedMoviesBack     bool
	TraktSyncRemovedMoviesLocation int
	TraktSyncRemovedMoviesList     int
	TraktSyncRemovedShows          bool
	TraktSyncRemovedShowsBack      bool
	TraktSyncRemovedShowsLocation  int
	TraktSyncRemovedShowsList      int
	TraktProgressHideUnaired       bool
	TraktProgressSort              int
	TraktProgressDateFormat        string
	TraktProgressColorDate         string
	TraktProgressColorShow         string
	TraktProgressColorEpisode      string
	TraktProgressColorUnaired      string
	TraktCalendarsHideWatched      bool
	TraktCalendarsDateFormat       string
	TraktCalendarsColorDate        string
	TraktCalendarsColorShow        string
	TraktCalendarsColorEpisode     string
	TraktCalendarsColorUnaired     string
	TraktUseLowestReleaseDate      bool

	UpdateFrequency                int
	UpdateDelay                    int
	UpdateAutoScan                 bool
	PlayResumeAction               int
	PlayResumeBack                 int
	TMDBApiKey                     string
	TMDBShowUseProdCompanyAsStudio bool
	TMDBImagesQuality              int

	OSDBToken              string
	OSDBTokenExpiry        int64
	OSDBUser               string
	OSDBPass               string
	OSDBLanguage           string
	OSDBAutoLanguage       bool
	OSDBAutoLoad           bool
	OSDBAutoLoadCount      int
	OSDBAutoLoadDelete     bool
	OSDBAutoLoadSkipExists bool
	OSDBIncludedEnabled    bool
	OSDBIncludedSkipExists bool

	SortingModeMovies           int
	SortingModeShows            int
	ResolutionPreferenceMovies  int
	ResolutionPreferenceShows   int
	PercentageAdditionalSeeders int

	CustomProviderTimeoutEnabled bool
	CustomProviderTimeout        int
	ProviderUseLowestReleaseDate bool

	InternalDNSEnabled  bool
	InternalDNSSkipIPv6 bool
	InternalDNSOrder    int
	InternalDNSOpenNic  []string

	InternalProxyEnabled     bool
	InternalProxyLogging     bool
	InternalProxyLoggingBody bool

	ProxyURL         string
	ProxyType        int
	ProxyEnabled     bool
	ProxyHost        string
	ProxyPort        int
	ProxyLogin       string
	ProxyPassword    string
	ProxyUseHTTP     bool
	ProxyUseTracker  bool
	ProxyUseDownload bool

	CompletedMove       bool
	CompletedMoviesPath string
	CompletedShowsPath  string

	LocalOnlyClient bool
	LogLevel        int
}

Configuration ...

func Get

func Get() *Configuration

Get ...

func Reload

func Reload() (ret *Configuration, err error)

Reload ...

type XbmcSettings

type XbmcSettings map[string]interface{}

func (*XbmcSettings) ToBool

func (s *XbmcSettings) ToBool(key string) (ret bool)

func (*XbmcSettings) ToInt

func (s *XbmcSettings) ToInt(key string) (ret int)

func (*XbmcSettings) ToInt64

func (s *XbmcSettings) ToInt64(key string) (ret int64)

func (*XbmcSettings) ToString

func (s *XbmcSettings) ToString(key string) (ret string)

Jump to

Keyboard shortcuts

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