update crate names

This commit is contained in:
OMGeeky
2024-04-20 13:47:40 +02:00
parent 0980735b36
commit cea7903d10
5 changed files with 13 additions and 12 deletions

View File

@@ -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"

View File

@@ -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,
};

View File

@@ -1,3 +1,4 @@
use crate::client::utils::ffmpeg::run_ffmpeg_concat;
use crate::errors::SplitterError;
use crate::prelude::*;
use anyhow::Context;

View File

@@ -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),

View File

@@ -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?;