From a6f6fb3ef22658508671296a31367a198205da99 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 8 Apr 2020 15:30:29 +0300 Subject: Display thumbnail for all files and add commands to download and open files --- config/config.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'config') diff --git a/config/config.go b/config/config.go index e8c7b1a..3507833 100644 --- a/config/config.go +++ b/config/config.go @@ -66,6 +66,7 @@ type Config struct { HistoryPath string `yaml:"history_path"` RoomListPath string `yaml:"room_list_path"` MediaDir string `yaml:"media_dir"` + DownloadDir string `yaml:"download_dir"` StateDir string `yaml:"state_dir"` Preferences UserPreferences `yaml:"-"` @@ -78,6 +79,7 @@ type Config struct { // NewConfig creates a config that loads data from the given directory. func NewConfig(configDir, cacheDir string) *Config { + home, _ := os.UserHomeDir() return &Config{ Dir: configDir, CacheDir: cacheDir, @@ -85,6 +87,7 @@ func NewConfig(configDir, cacheDir string) *Config { RoomListPath: filepath.Join(cacheDir, "rooms.gob.gz"), StateDir: filepath.Join(cacheDir, "state"), MediaDir: filepath.Join(cacheDir, "media"), + DownloadDir: home, RoomCacheSize: 32, RoomCacheAge: 1 * 60, -- cgit v1.2.3