]> njoseph.me Git - nimcoon.git/blob - src/config.nim
Fix all recent bugs. Shift to Invidious API.
[nimcoon.git] / src / config.nim
1 discard """"
2 Configuration goes through three levels of overrides:
3
4 /etc/nimcoon/config.json - configuration set by system administrator
5 ~/.config/nimcoon/config.json - per user configuration
6 default configuration provided in this file
7 """"
8
9 # Default configuration values
10
11 # Supported video players in order of preference.
12 # Should be able to play YouTube videos directly.
13 let supportedPlayers* = ["mpv", "vlc"]
14
15 # Only show these many results
16 let limit* = 10
17
18 # Download videos to this directory
19 let videoDownloadDirectory* = "~/Videos"
20
21 # Download music to this directory
22 let musicDownloadDirectory* = "~/Music"
23
24 # Rewrite Invidious URLs to YouTube
25 # Using Invidious as a proxy makes loading YouTube videos much slower
26 let rewriteInvidiousURLs* = true
27
28 # Invidious instance for querying
29 # This instance should have a valid public API
30 # Check like this: curl https://invidious.xyz/api/v1/search\?q\=cats
31 let invidiousInstance* = "https://invidious.xyz"
32
33 # import os
34
35 # func getConfigFile(dir): string = getConfigDir() / "nimcoon" / "config.json"
36
37 # const ADMIN_CONFIGURATION = getConfigFile("etc")
38 # const USER_CONFIGURATION = getConfigFile(getConfigDir())
39
40 # const DEFAULT_CONFIGURATION = {
41 # "entries_per_page": 10,
42 # "video_download_directory": "~/Videos",
43 # "music_download_directory": "~/Music",
44 # "always_fullscreen": false, # TODO not implemented yet
45 # "rewrite_invidious_urls": false
46 # }.toTable # toTable creates an immutable Table (newTable doesn't)