diff --git a/Cargo.lock b/Cargo.lock index 09ed995..86dd0d2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -756,50 +756,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "diesel" -version = "2.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "158fe8e2e68695bd615d7e4f3227c0727b151330d3e253b525086c348d055d5e" -dependencies = [ - "diesel_derives", - "libsqlite3-sys", - "time", -] - -[[package]] -name = "diesel_derives" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f2c3de51e2ba6bf2a648285696137aaf0f5f487bcbea93972fe8a364e131a4" -dependencies = [ - "diesel_table_macro_syntax", - "dsl_auto_type", - "proc-macro2", - "quote", - "syn 2.0.77", -] - -[[package]] -name = "diesel_migrations" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a73ce704bad4231f001bff3314d91dce4aba0770cee8b233991859abc15c1f6" -dependencies = [ - "diesel", - "migrations_internals", - "migrations_macros", -] - -[[package]] -name = "diesel_table_macro_syntax" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" -dependencies = [ - "syn 2.0.77", -] - [[package]] name = "digest" version = "0.10.7" @@ -845,20 +801,6 @@ version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" -[[package]] -name = "dsl_auto_type" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5d9abe6314103864cc2d8901b7ae224e0ab1a103a0a416661b4097b0779b607" -dependencies = [ - "darling", - "either", - "heck", - "proc-macro2", - "quote", - "syn 2.0.77", -] - [[package]] name = "either" version = "1.13.0" @@ -1191,7 +1133,7 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", + "http 0.2.12", "indexmap 2.5.0", "slab", "tokio", @@ -1286,6 +1228,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.6" @@ -1293,7 +1246,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.12", "pin-project-lite", ] @@ -1320,7 +1273,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.12", "http-body", "httparse", "httpdate", @@ -1503,8 +1456,6 @@ dependencies = [ "cxx-qt", "cxx-qt-build", "cxx-qt-lib", - "diesel", - "diesel_migrations", "dirs", "fastrand 2.1.1", "obws", @@ -1642,27 +1593,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "migrations_internals" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd01039851e82f8799046eabbb354056283fb265c8ec0996af940f4e85a380ff" -dependencies = [ - "serde", - "toml", -] - -[[package]] -name = "migrations_macros" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb161cc72176cb37aa47f1fc520d3ef02263d67d661f44f05d05a079e1237fd" -dependencies = [ - "migrations_internals", - "proc-macro2", - "quote", -] - [[package]] name = "mime" version = "0.3.17" @@ -1847,11 +1777,11 @@ dependencies = [ [[package]] name = "obws" -version = "0.11.5" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1a1f9a0b90718cf798dd72018d1a59ef01c339b67fb7d56e63503b98d68f74e" +checksum = "815d78d5e0a99aa961c05aa07b52d82b2bd2d4414b0ff0a2a3db7c12332fa807" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "bitflags 2.6.0", "futures-util", "rgb", @@ -1866,6 +1796,7 @@ dependencies = [ "tokio", "tokio-tungstenite", "tracing", + "uuid", ] [[package]] @@ -2105,7 +2036,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit 0.19.15", + "toml_edit", ] [[package]] @@ -2249,7 +2180,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.12", "http-body", "hyper", "hyper-tls", @@ -2472,15 +2403,6 @@ dependencies = [ "syn 2.0.77", ] -[[package]] -name = "serde_spanned" -version = "0.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" -dependencies = [ - "serde", -] - [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -2953,18 +2875,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", @@ -3081,9 +3003,9 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.20.1" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" dependencies = [ "futures-util", "log", @@ -3104,26 +3026,11 @@ dependencies = [ "tokio", ] -[[package]] -name = "toml" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.22.20", -] - [[package]] name = "toml_datetime" version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" -dependencies = [ - "serde", -] [[package]] name = "toml_edit" @@ -3133,20 +3040,7 @@ checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap 2.5.0", "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.22.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" -dependencies = [ - "indexmap 2.5.0", - "serde", - "serde_spanned", - "toml_datetime", - "winnow 0.6.18", + "winnow", ] [[package]] @@ -3237,20 +3131,19 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tungstenite" -version = "0.20.1" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +checksum = "18e5b8366ee7a95b16d32197d0b2604b43a0be89dc5fac9f8e96ccafbaedda8a" dependencies = [ "byteorder", "bytes", "data-encoding", - "http", + "http 1.1.0", "httparse", "log", "rand", "sha1", "thiserror", - "url", "utf-8", ] @@ -3340,6 +3233,15 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "uuid" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +dependencies = [ + "serde", +] + [[package]] name = "valuable" version = "0.1.0" @@ -3688,15 +3590,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winnow" -version = "0.6.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" -dependencies = [ - "memchr", -] - [[package]] name = "winreg" version = "0.50.0" diff --git a/Cargo.toml b/Cargo.toml index 8497e24..dff6e5c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,10 +27,8 @@ cxx-qt = "0.6.1" cxx-qt-lib = "0.6.1" # home = "0.5.4" dirs = "5.0.0" -diesel = { version = "2.0.3", features = ["sqlite"] } # libsqlite3-sys = { version = ">=0.17.2", features = ["bundled"] } youtube_dl = "0.8.0" -diesel_migrations = { version = "2.1.0", features = ["sqlite"] } tar = "0.4.40" zstd = "0.12.4" serde_json = "1.0.104" @@ -41,7 +39,7 @@ tokio = { version = "1.32.0", features = ["full"] } tracing-subscriber = { version = "0.3.17", features = ["fmt", "std", "chrono", "time", "local-time", "env-filter"] } tracing = "0.1.37" time = { version = "0.3.29", features = ["formatting", "macros"] } -obws = "0.11.5" +obws = "0.13.0" reqwest = "0.11.23" color-eyre = "0.6.3" # ffmpeg-next = "6.0.0" diff --git a/diesel.toml b/diesel.toml deleted file mode 100644 index 176aaf1..0000000 --- a/diesel.toml +++ /dev/null @@ -1,9 +0,0 @@ -# For documentation on how to configure this file, -# see https://diesel.rs/guides/configuring-diesel-cli - -[print_schema] -file = "src/rust/schema.rs" -generate_missing_sql_type_definitions = false - -[migrations_directory] -dir = "src/rust/migrations" diff --git a/guix.scm b/guix.scm deleted file mode 100644 index 34af93d..0000000 --- a/guix.scm +++ /dev/null @@ -1,237 +0,0 @@ -;; This file is provided to assist in setting up a development -;; environment for Lumina. -;; -;; Author: Chris Cochrun -;; -;; -;; -;; -;; -;; -;; -;; -;; -;; - -(use-modules (gnu packages) - (gnu packages rust) - (gnu packages rust-apps) - (gnu packages llvm) - (gnu packages qt) - (gnu packages gdb) - (gnu packages mold) - (gnu packages pkg-config) - (gnu packages kde-frameworks) - (gnu packages kde) - (gnu packages python) - (gnu packages video) - (gnu packages cmake) - (gnu packages commencement) - (gnu packages crates-io) - (gnu services) - (guix gexp) - (guix packages) - (guix git-download) - (guix build-system qt) - (guix build-system cmake) - (guix utils) - ((guix licenses) #:prefix license:)) - -(define this-directory - (dirname (local-file-absolute-file-name (local-file "guix.scm")))) - -(define source - (local-file this-directory - #:recursive? #t - #:select? (git-predicate this-directory))) - -;; Corrosion allows us to build a cmake project that uses rust too. -(define-public corrosion - (let ((commit "6ae04cf691fa721945428b2f96b0818085135890") - (revision "0.4.1")) - (package - (name "corrosion") - (version (git-version "0.4.1" revision commit)) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/corrosion-rs/corrosion.git") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1f0zmqm0iz669zqv74222x9759jbn1zq5z4snjwkd5g3lv0p4mkw")))) - (build-system cmake-build-system) - (arguments `(#:tests? #f)) - (inputs (list - cmake - `(,rust "out") - `(,rust "cargo"))) - (license license:gpl3+) - (home-page "idk") - (synopsis "Adding rust to cmake projects") - (description "idk")))) - -(define lumina-declarative - (package - (inherit qtdeclarative-5) - (name "qtdeclarative") - (arguments - (substitute-keyword-arguments (package-arguments qtsvg-5) - ((#:phases phases) - #~(modify-phases #$phases - (add-after 'build 'fix-qt5core-install-prefix - (lambda _ - ;; The Qt5Core install prefix is set to qtbase, but qmlcachegen - ;; is provided by qtdeclarative-5. - (substitute* - "lib/cmake/Qt5QuickCompiler/Qt5QuickCompilerConfig.cmake" - (("\\$\\{_qt5Core_install_prefix\\}") #$output)) - - (substitute* "lib/headers" - (("\\$\\$\\[QT_INSTALL_HEADERS\\]") - "$$clean_path($$replace(dir, mkspecs/modules, ../../include/qt5))")) - (substitute* "lib" - (("\\$\\$\\[QT_INSTALL_LIBS\\]") - "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))") - (("\\$\\$\\[QT_HOST_LIBS\\]") - "$$clean_path($$replace(dir, mkspecs/modules, ../../lib))")) - (substitute* "bin" - (("\\$\\$\\[QT_INSTALL_BINS\\]") - "$$clean_path($$replace(dir, mkspecs/modules, ../../bin))")))))))))) - -;; (define-public rust-cxx-qt-1 -;; (package -;; (name "rust-cxx") -;; (version "1.0.86") -;; (source -;; (origin -;; (method url-fetch) -;; (uri (crate-uri "cxx" version)) -;; (file-name -;; (string-append name "-" version ".tar.gz")) -;; (sha256 -;; (base32 -;; "0yc5gz723hiwqk7waygj63655fh5vzq3551p1j2wyzc06xf0glai")))) -;; (build-system cargo-build-system) -;; (arguments -;; `(#:tests? #f ; Cannot compile cxx-test-suite. -;; #:cargo-inputs -;; (("rust-cc" ,rust-cc-1) -;; ("rust-cxxbridge-flags" ,rust-cxxbridge-flags-1) -;; ("rust-cxxbridge-macro" ,rust-cxxbridge-macro-1) -;; ("rust-link-cplusplus" ,rust-link-cplusplus-1)) -;; #:cargo-development-inputs -;; (("rust-cxx-build" ,rust-cxx-build-1) -;; ("rust-cxx-gen" ,rust-cxx-gen-0.7) -;; ("rust-cxx-test-suite" ,rust-cxx-test-suite-0.0.0) -;; ("rust-rustversion" ,rust-rustversion-1) -;; ("rust-trybuild" ,rust-trybuild-1)))) -;; (home-page "https://cxx.rs") -;; (synopsis "Safe interop between Rust and C++") -;; (description "This package provides a safe interop between Rust and C++.") -;; (license (list license:expat license:asl2.0)))) - -;; (define-public rust-youtube-dl-0.9 -;; (package -;; (name "rust-youtube-dl") -;; (version "0.9.0") -;; (source -;; (origin -;; (method url-fetch) -;; (uri (crate-uri "youtube_dl" version)) -;; (file-name (string-append name "-" version ".tar.gz")) -;; (sha256 -;; (base32 "1fas41jl0f2c3lmdfikvcqbagi5skg9mfnb8xa976p2l5fc1lygw")))) -;; (build-system cargo-build-system) -;; (arguments -;; `(#:cargo-inputs (("rust-log" ,rust-log-0.4) -;; ("rust-reqwest" ,rust-reqwest-0.11) -;; ("rust-serde" ,rust-serde-1) -;; ("rust-serde-json" ,rust-serde-json-1) -;; ("rust-tokio" ,rust-tokio-1) -;; ("rust-wait-timeout" ,rust-wait-timeout-0.2)) -;; #:cargo-development-inputs (("rust-env-logger" ,rust-env-logger-0.10) -;; ("rust-tempfile" ,rust-tempfile-3) -;; ("rust-tokio" ,rust-tokio-1)))) -;; (home-page "https://github.com/GyrosOfWar/youtube-dl-rs") -;; (synopsis "Runs yt-dlp and parses its JSON output.") -;; (description "Runs yt-dlp and parses its JSON output.") -;; (license (list license:expat license:asl2.0)))) - -(define-public lumina - (package - (name "lumina") - (version "0.0.1") - (source source) - (build-system qt-build-system) - ;; (arguments `(#:phases - ;; (modify-phases %standard-phases - ;; (replace 'build - ;; (lambda* (#:key outputs #:allow-other-keys) - ;; (invoke "just" "build")))))) - - (inputs (list mpv - ffmpeg)) - (propagated-inputs (list clang - cmake - mold - clazy - clang-toolchain - gdb - pkg-config - lumina-declarative - qtbase-5 - qttools-5 - qt-creator - qtdeclarative-5 - qtquickcontrols2-5 - qtx11extras - qtwayland-5 - qtwebengine-5 - kirigami - kirigami-addons - qqc2-desktop-style - extra-cmake-modules - karchive - kcoreaddons - ki18n - sonnet - just - ;; corrosion is needed for build and is yet to - ;; be packaged. - corrosion - - `(,rust "out") - `(,rust "rustfmt") - `(,rust "cargo") - rust-analyzer - rust-clippy-0.0 - ;; rust-youtube-dl-0.9 - rust-configparser-3 - rust-serde-1 - rust-quote-1 - rust-cxx-1 - rust-dirs-5 - rust-diesel-1 - rust-diesel-migrations-1 - rust-tar-0.4 - rust-serde-json-1 - rust-fastrand-1 - rust-tokio-1 - rust-tracing-subscriber-0.3 - rust-tracing-0.1 - rust-time-0.3)) - - (native-search-paths - (list (search-path-specification - (variable "CMAKE_INCLUDE_PATH") - (files '("include"))))) - - (license license:gpl3+) - (home-page "idk") - (synopsis "A Church Presentation Application") - (description "idk"))) - -lumina diff --git a/src/rust/lib.rs b/src/rust/lib.rs index aaccd4d..10da268 100644 --- a/src/rust/lib.rs +++ b/src/rust/lib.rs @@ -1,11 +1,9 @@ pub mod ffmpeg; pub mod file_helper; pub mod image_model; -pub mod models; pub mod obs; pub mod presentation_model; pub mod reveal_js; -pub mod schema; pub mod service_item_model; pub mod settings; pub mod slide_model; diff --git a/src/rust/models.rs b/src/rust/models.rs deleted file mode 100644 index 46e4586..0000000 --- a/src/rust/models.rs +++ /dev/null @@ -1,56 +0,0 @@ -use diesel::prelude::*; -use diesel::sqlite::SqliteConnection; -use diesel_migrations::{ - embed_migrations, EmbeddedMigrations, MigrationHarness, -}; - -pub const MIGRATIONS: EmbeddedMigrations = - embed_migrations!("src/rust/migrations"); - -pub fn run_migrations(conn: &mut SqliteConnection) -> bool { - conn.run_pending_migrations(MIGRATIONS).unwrap(); - true -} - -#[derive(Queryable)] -pub struct Image { - pub id: i32, - pub title: String, - pub path: String, -} - -#[derive(Queryable)] -pub struct Video { - pub id: i32, - pub title: String, - pub path: String, - pub start_time: Option, - pub end_time: Option, - pub looping: bool, -} - -#[derive(Queryable)] -pub struct Presentation { - pub id: i32, - pub title: String, - pub path: String, - pub page_count: Option, - pub html: bool, -} - -#[derive(Queryable)] -pub struct Song { - pub id: i32, - pub title: String, - pub lyrics: Option, - pub author: Option, - pub ccli: Option, - pub audio: Option, - pub verse_order: Option, - pub background: Option, - pub background_type: Option, - pub horizontal_text_alignment: Option, - pub vertical_text_alignment: Option, - pub font: Option, - pub font_size: Option, -} diff --git a/src/rust/schema.rs b/src/rust/schema.rs deleted file mode 100644 index 9a25615..0000000 --- a/src/rust/schema.rs +++ /dev/null @@ -1,67 +0,0 @@ -// @generated automatically by Diesel CLI. - -diesel::table! { - images (id) { - id -> Integer, - title -> Text, - #[sql_name = "filePath"] - path -> Text, - } -} - -diesel::table! { - presentations (id) { - id -> Integer, - title -> Text, - #[sql_name = "filePath"] - path -> Text, - #[sql_name = "pageCount"] - page_count -> Nullable, - html -> Bool, - } -} - -diesel::table! { - songs (id) { - id -> Integer, - title -> Text, - lyrics -> Nullable, - author -> Nullable, - ccli -> Nullable, - audio -> Nullable, - #[sql_name = "vorder"] - verse_order -> Nullable, - background -> Nullable, - #[sql_name = "backgroundType"] - background_type -> Nullable, - #[sql_name = "horizontalTextAlignment"] - horizontal_text_alignment -> Nullable, - #[sql_name = "verticalTextAlignment"] - vertical_text_alignment -> Nullable, - font -> Nullable, - #[sql_name = "fontSize"] - font_size -> Nullable, - } -} - -diesel::table! { - videos (id) { - id -> Integer, - title -> Text, - #[sql_name = "filePath"] - path -> Text, - #[sql_name = "startTime"] - start_time -> Nullable, - #[sql_name = "endTime"] - end_time -> Nullable, - #[sql_name = "loop"] - looping -> Bool, - } -} - -diesel::allow_tables_to_appear_in_same_query!( - images, - presentations, - songs, - videos, -); diff --git a/src/rust/service_item_model.rs b/src/rust/service_item_model.rs index 39cc56b..ae03963 100644 --- a/src/rust/service_item_model.rs +++ b/src/rust/service_item_model.rs @@ -290,7 +290,6 @@ mod service_item_model { } } -use crate::obs::Obs; use crate::service_item_model::service_item_model::QList_QString; use cxx_qt::{CxxQtType, Threading}; use cxx_qt_lib::{ @@ -359,7 +358,6 @@ impl Default for ServiceItem { pub struct ServiceItemModelRust { id: i32, service_items: Vec, - obs: Option, count: i32, save_progress: f32, saved: bool, @@ -367,20 +365,9 @@ pub struct ServiceItemModelRust { impl Default for ServiceItemModelRust { fn default() -> Self { - let obs = - tokio::runtime::Runtime::new().unwrap().block_on(async { - match Obs::new().await { - Ok(o) => Some(o), - Err(e) => { - error!(e); - None - } - } - }); Self { id: 0, service_items: Vec::new(), - obs, count: 0, save_progress: 0.0, saved: false, @@ -823,7 +810,6 @@ impl service_item_model::ServiceItemModel { // println!("service_item is deactivating {:?}", i); service_item.active = false; } - let _obs = self.as_mut().obs.clone(); if let Some(service_item) = self .as_mut() @@ -837,14 +823,6 @@ impl service_item_model::ServiceItemModel { background_type = ?service_item.background_type, kind = ?service_item.ty); service_item.active = true; - // if let Some(obs) = obs { - // match obs - // .set_scene(service_item.obs_scene.to_string()) - // { - // Ok(()) => debug!("Successfully set scene"), - // Err(e) => error!(e), - // } - // } self.as_mut().data_changed(tl, br, &vector_roles); // We use this signal generated by our signals enum to tell QML that // the active service_item has changed which is used to reposition views. diff --git a/src/rust/utils.rs b/src/rust/utils.rs index c6a803c..073cbcc 100644 --- a/src/rust/utils.rs +++ b/src/rust/utils.rs @@ -7,9 +7,6 @@ use tracing_subscriber::EnvFilter; use self::utils::{QString, QUrl}; mod db { - use diesel::{Connection, SqliteConnection}; - use dirs::data_local_dir; - // pub enum Model { // Songs, // Presentations,