Rename mediarepo-model to mediarepo-logic crate

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/5/head
trivernis 3 years ago
parent ea14222e44
commit 1dedd8b327
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -1225,7 +1225,7 @@ dependencies = [
"glob", "glob",
"log", "log",
"mediarepo-core", "mediarepo-core",
"mediarepo-model", "mediarepo-logic",
"mediarepo-socket", "mediarepo-socket",
"num-integer", "num-integer",
"rolling-file", "rolling-file",
@ -1251,7 +1251,7 @@ dependencies = [
] ]
[[package]] [[package]]
name = "mediarepo-model" name = "mediarepo-logic"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"async-trait", "async-trait",
@ -1275,7 +1275,7 @@ dependencies = [
"compare", "compare",
"mediarepo-core", "mediarepo-core",
"mediarepo-database", "mediarepo-database",
"mediarepo-model", "mediarepo-logic",
"port_check", "port_check",
"rayon", "rayon",
"serde 1.0.132", "serde 1.0.132",

@ -1,6 +1,6 @@
[workspace] [workspace]
members = ["mediarepo-core", "mediarepo-database", "mediarepo-model", "mediarepo-socket", "."] members = ["mediarepo-core", "mediarepo-database", "mediarepo-logic", "mediarepo-socket", "."]
default-members = ["mediarepo-core", "mediarepo-database", "mediarepo-model", "mediarepo-socket", "."] default-members = ["mediarepo-core", "mediarepo-database", "mediarepo-logic", "mediarepo-socket", "."]
[package] [package]
name = "mediarepo-daemon" name = "mediarepo-daemon"
@ -31,8 +31,8 @@ log = "^0.4.14"
[dependencies.mediarepo-core] [dependencies.mediarepo-core]
path = "./mediarepo-core" path = "./mediarepo-core"
[dependencies.mediarepo-model] [dependencies.mediarepo-logic]
path = "./mediarepo-model" path = "mediarepo-logic"
[dependencies.mediarepo-socket] [dependencies.mediarepo-socket]
path = "./mediarepo-socket" path = "./mediarepo-socket"
@ -47,4 +47,4 @@ features = ["env-filter", "ansi", "json"]
[features] [features]
default = ["ffmpeg"] default = ["ffmpeg"]
ffmpeg = ["mediarepo-core/ffmpeg", "mediarepo-model/ffmpeg"] ffmpeg = ["mediarepo-core/ffmpeg", "mediarepo-logic/ffmpeg"]

@ -1,5 +1,5 @@
[package] [package]
name = "mediarepo-model" name = "mediarepo-logic"
version = "0.1.0" version = "0.1.0"
edition = "2018" edition = "2018"
workspace = ".." workspace = ".."

@ -19,8 +19,8 @@ path = "../mediarepo-core"
[dependencies.mediarepo-database] [dependencies.mediarepo-database]
path = "../mediarepo-database" path = "../mediarepo-database"
[dependencies.mediarepo-model] [dependencies.mediarepo-logic]
path = "../mediarepo-model" path = "../mediarepo-logic"
[dependencies.tokio] [dependencies.tokio]
version = "^1.15.0" version = "^1.15.0"

@ -2,11 +2,11 @@ use mediarepo_core::mediarepo_api::types::files::{
FileBasicDataResponse, FileMetadataResponse, FileStatus, ThumbnailMetadataResponse, FileBasicDataResponse, FileMetadataResponse, FileStatus, ThumbnailMetadataResponse,
}; };
use mediarepo_core::mediarepo_api::types::tags::{NamespaceResponse, TagResponse}; use mediarepo_core::mediarepo_api::types::tags::{NamespaceResponse, TagResponse};
use mediarepo_model::file::{File, FileStatus as FileStatusModel}; use mediarepo_logic::file::{File, FileStatus as FileStatusModel};
use mediarepo_model::file_metadata::FileMetadata; use mediarepo_logic::file_metadata::FileMetadata;
use mediarepo_model::namespace::Namespace; use mediarepo_logic::namespace::Namespace;
use mediarepo_model::tag::Tag; use mediarepo_logic::tag::Tag;
use mediarepo_model::thumbnail::Thumbnail; use mediarepo_logic::thumbnail::Thumbnail;
pub trait FromModel<M> { pub trait FromModel<M> {
fn from_model(model: M) -> Self; fn from_model(model: M) -> Self;

@ -4,8 +4,8 @@ use mediarepo_core::mediarepo_api::types::misc::InfoResponse;
use mediarepo_core::settings::{PortSetting, Settings}; use mediarepo_core::settings::{PortSetting, Settings};
use mediarepo_core::tokio_graceful_shutdown::SubsystemHandle; use mediarepo_core::tokio_graceful_shutdown::SubsystemHandle;
use mediarepo_core::type_keys::{RepoPathKey, SettingsKey, SizeMetadataKey, SubsystemKey}; use mediarepo_core::type_keys::{RepoPathKey, SettingsKey, SizeMetadataKey, SubsystemKey};
use mediarepo_model::repo::Repo; use mediarepo_logic::repo::Repo;
use mediarepo_model::type_keys::RepoKey; use mediarepo_logic::type_keys::RepoKey;
use std::net::SocketAddr; use std::net::SocketAddr;
use std::path::PathBuf; use std::path::PathBuf;
use std::sync::Arc; use std::sync::Arc;

@ -4,10 +4,10 @@ use mediarepo_core::mediarepo_api::types::files::FileStatus as ApiFileStatus;
use mediarepo_core::mediarepo_api::types::filtering::{ use mediarepo_core::mediarepo_api::types::filtering::{
FilterExpression, FilterQuery, PropertyQuery, TagQuery, ValueComparator, FilterExpression, FilterQuery, PropertyQuery, TagQuery, ValueComparator,
}; };
use mediarepo_model::file::filter::NegatableComparator::{Is, IsNot}; use mediarepo_logic::file::filter::NegatableComparator::{Is, IsNot};
use mediarepo_model::file::filter::{FilterFileProperty, FilterProperty, OrderingComparator}; use mediarepo_logic::file::filter::{FilterFileProperty, FilterProperty, OrderingComparator};
use mediarepo_model::file::{File, FileStatus}; use mediarepo_logic::file::{File, FileStatus};
use mediarepo_model::repo::Repo; use mediarepo_logic::repo::Repo;
use std::collections::HashMap; use std::collections::HashMap;
#[tracing::instrument(level = "debug", skip(repo))] #[tracing::instrument(level = "debug", skip(repo))]

@ -5,9 +5,9 @@ use mediarepo_core::mediarepo_api::types::filtering::{SortDirection, SortKey};
use mediarepo_database::queries::tags::{ use mediarepo_database::queries::tags::{
get_cids_with_namespaced_tags, get_content_descriptors_with_tag_count, get_cids_with_namespaced_tags, get_content_descriptors_with_tag_count,
}; };
use mediarepo_model::file::File; use mediarepo_logic::file::File;
use mediarepo_model::file_metadata::FileMetadata; use mediarepo_logic::file_metadata::FileMetadata;
use mediarepo_model::repo::Repo; use mediarepo_logic::repo::Repo;
use rayon::iter::{IntoParallelRefIterator, ParallelIterator}; use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
use std::cmp::Ordering; use std::cmp::Ordering;
use std::collections::HashMap; use std::collections::HashMap;

@ -5,9 +5,9 @@ use mediarepo_core::mediarepo_api::types::identifier::FileIdentifier;
use mediarepo_core::mediarepo_api::types::repo::SizeType; use mediarepo_core::mediarepo_api::types::repo::SizeType;
use mediarepo_core::type_keys::{RepoPathKey, SettingsKey}; use mediarepo_core::type_keys::{RepoPathKey, SettingsKey};
use mediarepo_core::utils::get_folder_size; use mediarepo_core::utils::get_folder_size;
use mediarepo_model::file::File; use mediarepo_logic::file::File;
use mediarepo_model::repo::Repo; use mediarepo_logic::repo::Repo;
use mediarepo_model::type_keys::RepoKey; use mediarepo_logic::type_keys::RepoKey;
use std::sync::Arc; use std::sync::Arc;
use tokio::fs; use tokio::fs;

@ -9,7 +9,7 @@ use mediarepo_core::error::RepoResult;
use mediarepo_core::fs::drop_file::DropFile; use mediarepo_core::fs::drop_file::DropFile;
use mediarepo_core::settings::{PathSettings, Settings}; use mediarepo_core::settings::{PathSettings, Settings};
use mediarepo_core::tokio_graceful_shutdown::{SubsystemHandle, Toplevel}; use mediarepo_core::tokio_graceful_shutdown::{SubsystemHandle, Toplevel};
use mediarepo_model::repo::Repo; use mediarepo_logic::repo::Repo;
use mediarepo_socket::start_tcp_server; use mediarepo_socket::start_tcp_server;
use std::env; use std::env;
use std::time::Duration; use std::time::Duration;

@ -1,7 +1,7 @@
use mediarepo_core::error::RepoResult; use mediarepo_core::error::RepoResult;
use mediarepo_core::settings::v1::SettingsV1; use mediarepo_core::settings::v1::SettingsV1;
use mediarepo_core::settings::{PathSettings, Settings}; use mediarepo_core::settings::{PathSettings, Settings};
use mediarepo_model::repo::Repo; use mediarepo_logic::repo::Repo;
use std::path::PathBuf; use std::path::PathBuf;
use tokio::fs; use tokio::fs;

Loading…
Cancel
Save