This commit is contained in:
fengchuanhn@gmail.com
2026-05-22 18:33:46 +08:00
parent 0eb5dbde5b
commit 2abc2134a8
10 changed files with 891 additions and 31 deletions

View File

@@ -5,6 +5,8 @@ pub mod audio_db;
pub mod audio_store;
pub mod avatar_db;
pub mod avatar_store;
pub mod material_db;
pub mod material_store;
pub mod video_db;
pub mod video_store;
pub mod local_config;
@@ -35,6 +37,7 @@ pub fn run() {
.manage(auth_session::AuthSession::default())
.manage(app_config::AppConfig::new())
.manage(avatar_store::AvatarStore::new())
.manage(material_store::MaterialStore::new())
.manage(audio_store::AudioStore::new())
.manage(video_store::VideoStore::new())
.manage(publish_store::PublishStore::new())
@@ -50,6 +53,7 @@ pub fn run() {
tauri::async_runtime::block_on(async move {
let app_config = handle.state::<app_config::AppConfig>();
let avatar_store = handle.state::<avatar_store::AvatarStore>();
let material_store = handle.state::<material_store::MaterialStore>();
let audio_store = handle.state::<audio_store::AudioStore>();
let video_store = handle.state::<video_store::VideoStore>();
let publish_store = handle.state::<publish_store::PublishStore>();
@@ -60,6 +64,7 @@ pub fn run() {
let db_path = dir.join("local_config.db");
app_config.init_local_store(db_path).await?;
avatar_store.init(dir.join("avatars.db")).await?;
material_store.init(dir.join("video_materials.db")).await?;
audio_store.init(dir.join("generated_audios.db")).await?;
video_store.init(dir.join("generated_videos.db")).await?;
publish_store.init(dir.join("publish_accounts.db")).await?;
@@ -104,6 +109,10 @@ pub fn run() {
commands::avatar::delete_avatar,
commands::avatar::avatar_name_exists,
commands::avatar::import_avatar_video,
commands::material::list_materials,
commands::material::update_material_name,
commands::material::delete_material,
commands::material::import_material_files,
commands::audio::list_generated_audios,
commands::audio::insert_generated_audio,
commands::audio::delete_generated_audio,