From 0d2de5e2526613c845646f90023aa7e3b25c185a Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Sun, 24 Sep 2023 07:05:25 -0500 Subject: [PATCH] moving song related stuff to it's own mod Gonna try to organize pieces better, so this is step one. --- build.rs | 2 +- src/rust/lib.rs | 3 ++- src/rust/song_editor.rs | 1 - src/rust/songs/mod.rs | 2 ++ src/rust/songs/song_editor.rs | 1 + src/rust/{ => songs}/song_model.rs | 4 ++-- 6 files changed, 8 insertions(+), 5 deletions(-) delete mode 100644 src/rust/song_editor.rs create mode 100644 src/rust/songs/mod.rs create mode 100644 src/rust/songs/song_editor.rs rename src/rust/{ => songs}/song_model.rs (99%) diff --git a/build.rs b/build.rs index fa23418..98ad094 100644 --- a/build.rs +++ b/build.rs @@ -11,7 +11,7 @@ fn main() { .file("src/rust/image_model.rs") .file("src/rust/video_model.rs") .file("src/rust/presentation_model.rs") - .file("src/rust/song_model.rs") + .file("src/rust/songs/song_model.rs") .file("src/rust/ytdl.rs") .build(); } diff --git a/src/rust/lib.rs b/src/rust/lib.rs index 1a0d1a8..23e5aa0 100644 --- a/src/rust/lib.rs +++ b/src/rust/lib.rs @@ -10,7 +10,8 @@ mod service_thing; pub mod settings; pub mod slide_model; mod slide_obj; -pub mod song_model; +pub mod songs; pub mod video_model; pub mod ytdl; +pub mod utils; // mod video_thumbnail; diff --git a/src/rust/song_editor.rs b/src/rust/song_editor.rs deleted file mode 100644 index 8b13789..0000000 --- a/src/rust/song_editor.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/rust/songs/mod.rs b/src/rust/songs/mod.rs new file mode 100644 index 0000000..4e25172 --- /dev/null +++ b/src/rust/songs/mod.rs @@ -0,0 +1,2 @@ +pub mod song_editor; +pub mod song_model; diff --git a/src/rust/songs/song_editor.rs b/src/rust/songs/song_editor.rs new file mode 100644 index 0000000..8316b23 --- /dev/null +++ b/src/rust/songs/song_editor.rs @@ -0,0 +1 @@ +mod song_editor; diff --git a/src/rust/song_model.rs b/src/rust/songs/song_model.rs similarity index 99% rename from src/rust/song_model.rs rename to src/rust/songs/song_model.rs index 1eed603..d6dec24 100644 --- a/src/rust/song_model.rs +++ b/src/rust/songs/song_model.rs @@ -1,8 +1,8 @@ #[cxx_qt::bridge] -mod song_model { +pub mod song_model { use crate::models::*; use crate::schema::songs::dsl::*; - use crate::song_model::song_model::Song; + use crate::songs::song_model::song_model::Song; use diesel::sqlite::SqliteConnection; use diesel::{delete, insert_into, prelude::*, update}; use std::collections::HashMap;