remove test and resolve to ProjectDirs

This commit is contained in:
Love 2023-01-17 18:36:28 +01:00
parent d6cba0164d
commit e1f27905e7

View File

@ -10,19 +10,10 @@ pub use m3u8::M3u8;
pub use parser::Parser; pub use parser::Parser;
mod config; mod config;
use directories; use directories::ProjectDirs;
#[test]
pub fn aaaaaaaa() {
let a = directories::ProjectDirs::from("com", "billenius", "iptvnator_rs").unwrap();
let datadir = a.data_dir();
let configdir = a.config_dir();
println!("{:?}", datadir);
println!("{:?}", configdir);
}
pub fn setup() -> String { pub fn setup() -> String {
let project_dirs = directories::ProjectDirs::from("com", "billenius", "iptvnator_rs").unwrap(); let project_dirs = ProjectDirs::from("com", "billenius", "iptvnator_rs").unwrap();
let config_dir = project_dirs.config_dir(); let config_dir = project_dirs.config_dir();
let ilovetv_config_file = config_dir.join("iptv_url.txt"); let ilovetv_config_file = config_dir.join("iptv_url.txt");
if ilovetv_config_file.exists() { if ilovetv_config_file.exists() {