From cea7903d1032138f0c2a3cf6e1f5806e44845a93 Mon Sep 17 00:00:00 2001 From: OMGeeky Date: Sat, 20 Apr 2024 13:47:40 +0200 Subject: [PATCH] update crate names --- Cargo.toml | 6 +++--- src/client.rs | 6 +++--- src/client/utils.rs | 1 + src/errors.rs | 2 +- src/main.rs | 10 +++++----- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6079eb1..49a7889 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,13 @@ [package] -name = "splitter" +name = "twba-splitter" version = "0.1.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -backup-config = { version = "0.1", git="https://github.com/OMGeeky/backup_config.git" } -local-db = { version = "0.2", git="https://github.com/OMGeeky/twitch_backup.local_db.git" } +twba-backup-config = { version = "0.1", git="https://github.com/OMGeeky/backup_config.git" } +twba-local-db = { version = "0.2", git="https://github.com/OMGeeky/twitch_backup.local_db.git" } tokio = "1.33" tracing = "0.1" diff --git a/src/client.rs b/src/client.rs index 770a3cf..b5c85c5 100644 --- a/src/client.rs +++ b/src/client.rs @@ -1,9 +1,9 @@ use crate::errors::SplitterError; use crate::prelude::*; -use backup_config::Conf; +use twba_backup_config::Conf; use chrono::Duration; -use local_db::prelude::{Status, Videos, VideosColumn, VideosModel}; -use local_db::re_exports::sea_orm::{ +use twba_local_db::prelude::{Status, Videos, VideosColumn, VideosModel}; +use twba_local_db::re_exports::sea_orm::{ ActiveModelTrait, ActiveValue, ColumnTrait, DatabaseConnection, EntityTrait, IntoActiveModel, QueryFilter, }; diff --git a/src/client/utils.rs b/src/client/utils.rs index efe9ee0..fa22470 100644 --- a/src/client/utils.rs +++ b/src/client/utils.rs @@ -1,3 +1,4 @@ +use crate::client::utils::ffmpeg::run_ffmpeg_concat; use crate::errors::SplitterError; use crate::prelude::*; use anyhow::Context; diff --git a/src/errors.rs b/src/errors.rs index 30a7f68..c9bd9bb 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -7,7 +7,7 @@ pub enum SplitterError { LoadConfig(#[source] anyhow::Error), #[error("Some error with the database")] - OpenDatabase(#[from] local_db::re_exports::sea_orm::DbErr), + OpenDatabase(#[from] twba_local_db::re_exports::sea_orm::DbErr), #[error("File or Folder not found or invalid: {0:?}")] NotFound(PathBuf), diff --git a/src/main.rs b/src/main.rs index ce61eca..231c006 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,6 @@ use crate::errors::SplitterError; -use backup_config::prelude::Config; -use backup_config::Conf; +use twba_backup_config::prelude::Config; +use twba_backup_config::Conf; use prelude::*; pub mod client; @@ -11,7 +11,7 @@ async fn main() -> Result<()> { tracing_subscriber::fmt() .with_max_level(tracing::Level::INFO) .with_env_filter( - "sea_orm=warn,sea_orm_migration=warn,sqlx=warn,splitter=trace,local_db=warn,other=warn", + "sea_orm=warn,sea_orm_migration=warn,sqlx=warn,splitter=trace,twba_local_db=warn,other=warn", ) .init(); info!("Hello, world!"); @@ -29,8 +29,8 @@ async fn run() -> Result<()> { .load() .map_err(|e| SplitterError::LoadConfig(e.into()))?; - let db = local_db::open_database(Some(&conf.db_url)).await?; - local_db::migrate_db(&db).await?; + let db = twba_local_db::open_database(Some(&conf.db_url)).await?; + twba_local_db::migrate_db(&db).await?; let client = client::SplitterClient::new(conf, db); client.split_videos().await?;