X-Git-Url: http://njoseph.me/gitweb/nimcoon.git/blobdiff_plain/bd7117ada0e5f895e38c0476683e9adcae6dbd04..eacdf44b2d4a4a0b603f0b4f949430f81ecd711b:/src/config.nim diff --git a/src/config.nim b/src/config.nim index b231a83..7c4b6d9 100644 --- a/src/config.nim +++ b/src/config.nim @@ -1,4 +1,4 @@ -# Your configuration here. +# Default configuration values # Supported video players in order of preference. # Should be able to play YouTube videos directly. @@ -15,4 +15,32 @@ let musicDownloadDirectory* = "~/Music" # Rewrite Invidious URLs to YouTube # Using Invidious as a proxy makes loading YouTube videos much slower -let rewriteInvidiousURLs* = false +let rewriteInvidiousURLs* = true + +# Invidious instance for querying +# This instance should have a valid public API +# Check like this: curl https://invidious.xyz/api/v1/search\?q\=cats +let invidiousInstance* = "https://invidious.snopyta.org" + +discard """" +Configuration goes through three levels of overrides: + + /etc/nimcoon/config.json - configuration set by system administrator + ~/.config/nimcoon/config.json - per user configuration + default configuration provided in this file +"""" + +# import os + +# func getConfigFile(dir): string = getConfigDir() / "nimcoon" / "config.json" + +# const ADMIN_CONFIGURATION = getConfigFile("etc") +# const USER_CONFIGURATION = getConfigFile(getConfigDir()) + +# const DEFAULT_CONFIGURATION = { +# "entries_per_page": 10, +# "video_download_directory": "~/Videos", +# "music_download_directory": "~/Music", +# "always_fullscreen": false, # TODO not implemented yet +# "rewrite_invidious_urls": false +# }.toTable # toTable creates an immutable Table (newTable doesn't)