diff --git a/Cargo.lock b/Cargo.lock index 1d96703..7509de9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1184,7 +1184,7 @@ dependencies = [ [[package]] name = "nhentai_archivist" -version = "3.8.0" +version = "3.8.1" dependencies = [ "chrono", "load_config", diff --git a/Cargo.toml b/Cargo.toml index 18cdac0..8294c3a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ license = "MIT" name = "nhentai_archivist" readme = "readme.md" repository = "https://github.com/9-FS/nhentai_archivist" -version = "3.8.0" +version = "3.8.1" [dependencies] chrono = { version = "^0.4.0", features = ["serde"] } diff --git a/docker-compose.yaml b/docker-compose.yaml index a58ad40..fb2566b 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,7 +1,7 @@ services: nhentai_archivist: container_name: "nhentai_archivist" - image: "ghcr.io/9-fs/nhentai_archivist:3.8.0" + image: "ghcr.io/9-fs/nhentai_archivist:3.8.1" environment: HOST_OS: "Unraid" TZ: "UTC" diff --git a/src/connect_to_db.rs b/src/connect_to_db.rs index bb6d5d5..3e1b59f 100644 --- a/src/connect_to_db.rs +++ b/src/connect_to_db.rs @@ -8,11 +8,10 @@ use sqlx::migrate::MigrateDatabase; /// /// # Arguments /// - `db_url`: url to database file, might not be local but is recommended to be so -/// - `migrations_path`: path to directory containing migration files /// /// # Returns /// - connection pool to database or error -pub async fn connect_to_db(db_url: &str, db_migrations_path: &str) -> Result +pub async fn connect_to_db(db_url: &str) -> Result { let db: sqlx::SqlitePool; // database connection pool @@ -51,11 +50,8 @@ pub async fn connect_to_db(db_url: &str, db_migrations_path: &str) -> Result Result<(), Error> { const DB_FILEPATH: &str = "./db/db.sqlite"; // database filepath - const DB_MIGRATIONS_PATH: &str = "./db_migrations/"; // migrations path const HTTP_TIMEOUT: u64 = 30; // connection timeout const NHENTAI_HENTAI_SEARCH_URL: &str = "https://nhentai.net/api/gallery/"; // nhentai search by id api url const NHENTAI_TAG_SEARCH_URL: &str = "https://nhentai.net/api/galleries/search"; // nhentai search by tag api url @@ -78,7 +77,7 @@ pub async fn main_inner(config: Config) -> Result<(), Error> break 'iteration; // if server mode: only abort iteration, go straight to sleeping } - match connect_to_db(DB_FILEPATH, DB_MIGRATIONS_PATH).await // connect to database + match connect_to_db(DB_FILEPATH).await // connect to database { Ok(o) => db = o, Err(e) =>