File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -18,14 +18,14 @@ type Config struct {
1818 Persist bool `env:"PERSIST" env-default:"true"`
1919 System string `env:"EXPLO_SYSTEM"`
2020 Debug bool `env:"DEBUG" env-default:"false"`
21- Timeout int `env:"TIMEOUT" env-default:"10"`
2221}
2322
2423type ClientConfig struct {
2524 ClientID string `env:"CLIENT_ID" env-default:"explo"`
2625 LibraryName string `env:"LIBRARY_NAME" env-default:"Explo"`
2726 URL string `env:"SYSTEM_URL"`
2827 DownloadDir string `env:"DOWNLOAD_DIR"`
28+ SlskdDir string `env:"SLSKD_DIR"`
2929 PlaylistDir string `env:"PLAYLIST_DIR"`
3030 PlaylistName string
3131 PlaylistID string
@@ -99,11 +99,10 @@ type Slskd struct {
9999}
100100
101101type Youtube struct {
102- APIKey string `env:"YOUTUBE_API_KEY"`
103- Separator string `env:"FILENAME_SEPARATOR" env-default:" "`
104- FfmpegPath string `env:"FFMPEG_PATH"`
105- YtdlpPath string `env:"YTDLP_PATH"`
106- FilterList []string `env:"FILTER_LIST" env-default:"live,remix,instrumental,extended"`
102+ APIKey string `env:"YOUTUBE_API_KEY"`
103+ FfmpegPath string `env:"FFMPEG_PATH"`
104+ YtdlpPath string `env:"YTDLP_PATH"`
105+ Filters Filters
107106}
108107
109108func ReadEnv () Config {
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ package main
33import (
44 "explo/src/debug"
55 "log"
6- "time"
76
87 "explo/src/client"
98 "explo/src/config"
@@ -18,9 +17,9 @@ type Song struct {
1817 Album string
1918}
2019
21- func initHttpClient (cfg * config. Config ) * util.HttpClient {
20+ func initHttpClient () * util.HttpClient {
2221 return util .NewHttp (util.HttpClientConfig {
23- Timeout : time . Duration ( cfg . Timeout ) * time . Second ,
22+ Timeout : 10 ,
2423 })
2524}
2625
@@ -33,7 +32,7 @@ func main() {
3332
3433 cfg := config .ReadEnv ()
3534 setup (& cfg )
36- httpClient := initHttpClient (& cfg )
35+ httpClient := initHttpClient ()
3736 client , err := client .NewClient (& cfg , httpClient )
3837 if err != nil {
3938 log .Fatal (err )
You can’t perform that action at this time.
0 commit comments