aboutsummaryrefslogtreecommitdiff
path: root/logic
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2026-01-18 03:56:25 +0100
committermetamuffin <metamuffin@disroot.org>2026-01-18 03:56:25 +0100
commit901dff07ed357694eb35284a58c3cc6c003c53ce (patch)
treef6716c35112d25d8e8c3ece0e2305a261f2066e2 /logic
parent999249adc1120b1afa8f9d0015c31bea1980a7ee (diff)
downloadjellything-901dff07ed357694eb35284a58c3cc6c003c53ce.tar
jellything-901dff07ed357694eb35284a58c3cc6c003c53ce.tar.bz2
jellything-901dff07ed357694eb35284a58c3cc6c003c53ce.tar.zst
move db tests; remove old imports
Diffstat (limited to 'logic')
-rw-r--r--logic/src/account.rs1
-rw-r--r--logic/src/admin/log.rs4
-rw-r--r--logic/src/admin/user.rs4
-rw-r--r--logic/src/assets.rs1
-rw-r--r--logic/src/filter_sort.rs6
-rw-r--r--logic/src/home.rs6
-rw-r--r--logic/src/items.rs4
-rw-r--r--logic/src/lib.rs1
-rw-r--r--logic/src/login.rs1
-rw-r--r--logic/src/node.rs6
-rw-r--r--logic/src/search.rs1
-rw-r--r--logic/src/session.rs4
-rw-r--r--logic/src/stats.rs4
13 files changed, 0 insertions, 43 deletions
diff --git a/logic/src/account.rs b/logic/src/account.rs
index 116e4f6..812b7cf 100644
--- a/logic/src/account.rs
+++ b/logic/src/account.rs
@@ -6,7 +6,6 @@
use crate::{DATABASE, login::hash_password, session::Session};
use anyhow::Result;
-use jellycommon::user::{PlayerKind, Theme, User};
pub fn update_user_password(session: &Session, password: &str) -> Result<()> {
DATABASE.update_user(&session.user.name, |user| {
diff --git a/logic/src/admin/log.rs b/logic/src/admin/log.rs
index 2848aca..d266b64 100644
--- a/logic/src/admin/log.rs
+++ b/logic/src/admin/log.rs
@@ -4,10 +4,6 @@
Copyright (C) 2026 metamuffin <metamuffin.org>
*/
-use jellycommon::{
- api::{LogLevel, LogLine},
- chrono::Utc,
-};
use log::Level;
use std::{
collections::VecDeque,
diff --git a/logic/src/admin/user.rs b/logic/src/admin/user.rs
index 29a9cfc..a5f1b24 100644
--- a/logic/src/admin/user.rs
+++ b/logic/src/admin/user.rs
@@ -6,10 +6,6 @@
use crate::{DATABASE, session::Session};
use anyhow::{Result, anyhow};
-use jellycommon::{
- api::ApiAdminUsersResponse,
- user::{User, UserPermission},
-};
pub fn admin_users(session: &Session) -> Result<ApiAdminUsersResponse> {
session.assert_admin()?;
diff --git a/logic/src/assets.rs b/logic/src/assets.rs
index 1c4924c..462c8bf 100644
--- a/logic/src/assets.rs
+++ b/logic/src/assets.rs
@@ -6,7 +6,6 @@
use crate::{DATABASE, session::Session};
use anyhow::{Result, anyhow};
-use jellycommon::{Asset, NodeID, SourceTrackKind, TrackSource};
pub async fn get_node_thumbnail(_session: &Session, id: NodeID, t: f64) -> Result<Asset> {
let node = DATABASE
diff --git a/logic/src/filter_sort.rs b/logic/src/filter_sort.rs
index a17e7d2..afa36f8 100644
--- a/logic/src/filter_sort.rs
+++ b/logic/src/filter_sort.rs
@@ -3,12 +3,6 @@
which is licensed under the GNU Affero General Public License (version 3); see /COPYING.
Copyright (C) 2026 metamuffin <metamuffin.org>
*/
-use jellycommon::{
- Node, NodeKind, RatingType,
- api::{FilterProperty, NodeFilterSort, SortOrder, SortProperty},
- helpers::SortAnyway,
- user::NodeUserData,
-};
use std::sync::Arc;
pub fn filter_and_sort_nodes(
diff --git a/logic/src/home.rs b/logic/src/home.rs
index e87df74..73fc182 100644
--- a/logic/src/home.rs
+++ b/logic/src/home.rs
@@ -6,12 +6,6 @@
use crate::{DATABASE, node::DatabaseNodeUserDataExt, session::Session};
use anyhow::{Context, Result};
-use jellycommon::{
- NodeID, NodeKind, RatingType, Visibility,
- api::ApiHomeResponse,
- chrono::{Datelike, Utc},
- user::WatchedState,
-};
pub fn home(session: &Session) -> Result<ApiHomeResponse> {
let mut items = DATABASE.list_nodes_with_udata(&session.user.name)?;
diff --git a/logic/src/items.rs b/logic/src/items.rs
index a60290e..c618b9b 100644
--- a/logic/src/items.rs
+++ b/logic/src/items.rs
@@ -6,10 +6,6 @@
use crate::{DATABASE, filter_sort::filter_and_sort_nodes, session::Session};
use anyhow::Result;
-use jellycommon::{
- Visibility,
- api::{ApiItemsResponse, NodeFilterSort, SortOrder, SortProperty},
-};
pub fn all_items(
session: &Session,
diff --git a/logic/src/lib.rs b/logic/src/lib.rs
index 8ab8fce..6ff9e58 100644
--- a/logic/src/lib.rs
+++ b/logic/src/lib.rs
@@ -20,7 +20,6 @@ pub mod stats;
use anyhow::Context;
use anyhow::Result;
-use jellydb::Database;
use serde::{Deserialize, Serialize};
use std::path::PathBuf;
use std::sync::LazyLock;
diff --git a/logic/src/login.rs b/logic/src/login.rs
index 8416a5b..f79fafc 100644
--- a/logic/src/login.rs
+++ b/logic/src/login.rs
@@ -6,7 +6,6 @@
use crate::{CONF, DATABASE, session::create};
use anyhow::{Result, anyhow};
use argon2::{Argon2, PasswordHasher, password_hash::Salt};
-use jellycommon::user::UserPermission;
use log::info;
use std::{collections::HashSet, time::Duration};
diff --git a/logic/src/node.rs b/logic/src/node.rs
index b397f57..723b2f7 100644
--- a/logic/src/node.rs
+++ b/logic/src/node.rs
@@ -5,12 +5,6 @@
*/
use crate::{DATABASE, filter_sort::filter_and_sort_nodes, session::Session};
use anyhow::{Result, anyhow};
-use jellycommon::{
- IdentifierType, Node, NodeID, NodeKind, Visibility,
- api::{ApiNodeResponse, NodeFilterSort, SortOrder, SortProperty},
- user::{NodeUserData, WatchedState},
-};
-use jellydb::Database;
use std::{cmp::Reverse, collections::BTreeMap, sync::Arc};
pub fn get_node(
diff --git a/logic/src/search.rs b/logic/src/search.rs
index de1a53c..69f532f 100644
--- a/logic/src/search.rs
+++ b/logic/src/search.rs
@@ -5,7 +5,6 @@
*/
use crate::{DATABASE, node::DatabaseNodeUserDataExt, session::Session};
use anyhow::Result;
-use jellycommon::{Visibility, api::ApiSearchResponse};
use std::time::Instant;
pub fn search(session: &Session, query: &str, page: Option<usize>) -> Result<ApiSearchResponse> {
diff --git a/logic/src/session.rs b/logic/src/session.rs
index e21e9f8..03ff3a3 100644
--- a/logic/src/session.rs
+++ b/logic/src/session.rs
@@ -10,10 +10,6 @@ use aes_gcm_siv::{
};
use anyhow::anyhow;
use base64::Engine;
-use jellycommon::{
- chrono::{DateTime, Utc},
- user::{PermissionSet, User},
-};
use log::warn;
use serde::{Deserialize, Serialize};
use std::{sync::LazyLock, time::Duration};
diff --git a/logic/src/stats.rs b/logic/src/stats.rs
index 83ee8c8..38a4c4e 100644
--- a/logic/src/stats.rs
+++ b/logic/src/stats.rs
@@ -6,10 +6,6 @@
use crate::{DATABASE, session::Session};
use anyhow::Result;
-use jellycommon::{
- Node, NodeKind, Visibility,
- api::{ApiStatsResponse, StatsBin},
-};
use std::collections::BTreeMap;
pub fn stats(session: &Session) -> Result<ApiStatsResponse> {