mirror of
https://github.com/OMGeeky/downloader_config.git
synced 2026-02-23 15:38:31 +01:00
removed redundant DOWNLOADER_THREADS
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "downloader_config"
|
||||
version = "0.2.1"
|
||||
version = "0.3.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@@ -27,8 +27,6 @@ pub struct Config {
|
||||
pub youtube_video_length_minutes_hard_cap: i64,
|
||||
|
||||
pub download_folder_path: String,
|
||||
pub downloader_threads: usize,
|
||||
|
||||
}
|
||||
|
||||
pub fn load_config() -> Config {
|
||||
@@ -83,8 +81,7 @@ pub fn load_config() -> Config {
|
||||
|
||||
let download_folder_path =
|
||||
env::var("DOWNLOAD_FOLDER_PATH").unwrap_or("/tmp/twba/videos/".to_string());
|
||||
let downloader_threads =
|
||||
env::var("DOWNLOADER_THREADS").unwrap_or(10.to_string()).parse().unwrap();
|
||||
|
||||
trace!("load_config() done loading fields");
|
||||
Config {
|
||||
path_auth_code,
|
||||
@@ -105,6 +102,5 @@ pub fn load_config() -> Config {
|
||||
youtube_video_length_minutes_soft_cap,
|
||||
youtube_video_length_minutes_hard_cap,
|
||||
download_folder_path,
|
||||
downloader_threads,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user