Update dependencies of daemon

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/17/head
trivernis 3 years ago
parent 093396c16f
commit 9f37173edc
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -19,11 +19,6 @@ RUN apt-get install -y \
curl \ curl \
wget \ wget \
pkg-config \ pkg-config \
libavutil-dev \
libavformat-dev \
libavcodec-dev \
libavfilter-dev \
libavdevice-dev \
clang \ clang \
nodejs \ nodejs \
npm \ npm \
@ -39,4 +34,4 @@ ENV PATH="/root/.cargo/bin:${PATH}"
RUN python3 scripts/clean.py RUN python3 scripts/clean.py
RUN python3 scripts/check.py --install RUN python3 scripts/check.py --install
RUN python3 scripts/build.py all --verbose --ffmpeg RUN python3 scripts/build.py all --verbose

@ -77,16 +77,14 @@ $ ./scripts/check.py --install
All Componens: All Componens:
```sh ```sh
$ ./scripts/build.py all --ffmpeg $ ./scripts/build.py all
``` ```
Daemon only: Daemon only:
```sh ```sh
$ ./scripts/build.py daemon --ffmpeg $ ./scripts/build.py daemon
``` ```
If you don't want to build with ffmpeg support omit the `--ffmpeg` flag.
UI only: UI only:
```sh ```sh
$ ./scripts/build.py ui $ ./scripts/build.py ui

File diff suppressed because it is too large Load Diff

@ -16,7 +16,7 @@ name = "mediarepo-daemon"
path = "src/main.rs" path = "src/main.rs"
[dependencies] [dependencies]
tracing = "0.1.30" tracing = "0.1.31"
toml = "0.5.8" toml = "0.5.8"
structopt = "0.3.26" structopt = "0.3.26"
glob = "0.3.0" glob = "0.3.0"
@ -25,7 +25,7 @@ tracing-appender = "0.2.0"
tracing-log = "0.1.2" tracing-log = "0.1.2"
rolling-file = "0.1.0" rolling-file = "0.1.0"
num-integer = "0.1.44" num-integer = "0.1.44"
console-subscriber = "0.1.1" console-subscriber = "0.1.3"
log = "0.4.14" log = "0.4.14"
[dependencies.mediarepo-core] [dependencies.mediarepo-core]
@ -38,13 +38,9 @@ path = "mediarepo-logic"
path = "./mediarepo-socket" path = "./mediarepo-socket"
[dependencies.tokio] [dependencies.tokio]
version = "1.16.1" version = "1.17.0"
features = ["macros", "rt-multi-thread", "io-std", "io-util"] features = ["macros", "rt-multi-thread", "io-std", "io-util"]
[dependencies.tracing-subscriber] [dependencies.tracing-subscriber]
version= "0.3.8" version= "0.3.9"
features = ["env-filter", "ansi", "json"] features = ["env-filter", "ansi", "json"]
[features]
default = ["ffmpeg"]
ffmpeg = ["mediarepo-core/ffmpeg", "mediarepo-logic/ffmpeg"]

@ -17,35 +17,28 @@ typemap_rev = "0.1.5"
futures = "0.3.21" futures = "0.3.21"
itertools = "0.10.3" itertools = "0.10.3"
glob = "0.3.0" glob = "0.3.0"
tracing = "0.1.30" tracing = "0.1.31"
data-encoding = "2.3.2" data-encoding = "2.3.2"
tokio-graceful-shutdown = "0.4.3" tokio-graceful-shutdown = "0.4.3"
thumbnailer = "0.4.0"
[dependencies.thumbnailer]
version = "0.3.0"
default-features = false
[dependencies.sea-orm] [dependencies.sea-orm]
version = "0.6.0" version = "0.6.0"
default-features = false default-features = false
[dependencies.sqlx] [dependencies.sqlx]
version = "0.5.10" version = "0.5.11"
default-features = false default-features = false
features = ["migrate"] features = ["migrate"]
[dependencies.tokio] [dependencies.tokio]
version = "1.16.1" version = "1.17.0"
features = ["fs", "io-util", "io-std"] features = ["fs", "io-util", "io-std"]
[dependencies.config] [dependencies.config]
version = "0.11.0" version = "0.12.0"
features = ["toml"] features = ["toml"]
[dependencies.mediarepo-api] [dependencies.mediarepo-api]
path = "../../mediarepo-api" path = "../../mediarepo-api"
features = ["bromine"] features = ["bromine"]
[features]
default = []
ffmpeg = ["thumbnailer/ffmpeg"]

@ -25,17 +25,17 @@ pub struct Settings {
impl Settings { impl Settings {
pub fn read(root: &PathBuf) -> RepoResult<Self> { pub fn read(root: &PathBuf) -> RepoResult<Self> {
let mut settings = Config::default(); let settings = Config::builder()
settings .add_source(config::File::from_str(
.merge(config::File::from_str(
&*Settings::default().to_toml_string()?, &*Settings::default().to_toml_string()?,
FileFormat::Toml, FileFormat::Toml,
))? ))
.merge(config::File::from(root.join("repo")))? .add_source(config::File::from(root.join("repo")))
.merge(config::Environment::with_prefix("MEDIAREPO").separator("."))?; .add_source(config::Environment::with_prefix("MEDIAREPO").separator("."))
.build()?;
tracing::debug!("Settings are: {:#?}", settings); tracing::debug!("Settings are: {:#?}", settings);
Ok(settings.try_into::<Settings>()?) Ok(settings.try_deserialize()?)
} }
/// Parses settings from a string /// Parses settings from a string
@ -50,16 +50,16 @@ impl Settings {
.map(|p| p.to_string_lossy().to_string()) .map(|p| p.to_string_lossy().to_string())
.unwrap_or_else(|| String::from("./")); .unwrap_or_else(|| String::from("./"));
let mut settings = Config::default(); let settings = Config::builder()
settings .add_source(config::File::from_str(
.merge(config::File::from_str(
&*settings_main.to_toml_string()?, &*settings_main.to_toml_string()?,
FileFormat::Toml, FileFormat::Toml,
))? ))
.merge(config::Environment::with_prefix("MEDIAREPO"))?; .add_source(config::Environment::with_prefix("MEDIAREPO"))
.build()?;
tracing::debug!("Settings are: {:#?}", settings); tracing::debug!("Settings are: {:#?}", settings);
Ok(settings.try_into::<Settings>()?) Ok(settings.try_deserialize()?)
} }
/// Converts the settings into a toml string /// Converts the settings into a toml string

@ -8,13 +8,13 @@ workspace = ".."
[dependencies] [dependencies]
chrono = "0.4.19" chrono = "0.4.19"
tracing = "0.1.30" tracing = "0.1.31"
[dependencies.mediarepo-core] [dependencies.mediarepo-core]
path = "../mediarepo-core" path = "../mediarepo-core"
[dependencies.sqlx] [dependencies.sqlx]
version = "0.5.10" version = "0.5.11"
features = ["migrate"] features = ["migrate"]
[dependencies.sea-orm] [dependencies.sea-orm]

@ -10,9 +10,9 @@ workspace = ".."
chrono = "0.4.19" chrono = "0.4.19"
typemap_rev = "0.1.5" typemap_rev = "0.1.5"
serde = "1.0.136" serde = "1.0.136"
mime_guess = "2.0.3" mime_guess = "2.0.4"
mime = "0.3.16" mime = "0.3.16"
tracing = "0.1.30" tracing = "0.1.31"
async-trait = "0.1.52" async-trait = "0.1.52"
[dependencies.mediarepo-core] [dependencies.mediarepo-core]
@ -27,9 +27,6 @@ features = ["runtime-tokio-native-tls", "macros"]
default-features = false default-features = false
[dependencies.tokio] [dependencies.tokio]
version = "1.16.1" version = "1.17.0"
features = ["fs", "io-std", "io-util"] features = ["fs", "io-std", "io-util"]
[features]
ffmpeg = ["mediarepo-core/ffmpeg"]

@ -8,7 +8,7 @@ workspace = ".."
[dependencies] [dependencies]
serde = "1.0.136" serde = "1.0.136"
tracing = "0.1.30" tracing = "0.1.31"
compare = "0.1.0" compare = "0.1.0"
port_check = "0.1.5" port_check = "0.1.5"
rayon = "1.5.1" rayon = "1.5.1"
@ -23,7 +23,7 @@ path = "../mediarepo-database"
path = "../mediarepo-logic" path = "../mediarepo-logic"
[dependencies.tokio] [dependencies.tokio]
version = "1.16.1" version = "1.17.0"
features = ["net"] features = ["net"]
[dependencies.chrono] [dependencies.chrono]

@ -9,7 +9,6 @@ from typing import List
build_output = 'out' build_output = 'out'
verbose = False verbose = False
ffmpeg = False
install_tooling = False install_tooling = False
windows = os.name == 'nt' windows = os.name == 'nt'
@ -21,12 +20,10 @@ def main():
global install_tooling global install_tooling
global build_output global build_output
global verbose global verbose
global ffmpeg
global install_tooling global install_tooling
build_output = opts.output if opts.output else build_output build_output = opts.output if opts.output else build_output
verbose = opts.verbose verbose = opts.verbose
ffmpeg = opts.ffmpeg
install_tooling = opts.install_tooling install_tooling = opts.install_tooling
build(opts.component, opts.bundles) build(opts.component, opts.bundles)
@ -41,8 +38,6 @@ def parse_args():
'--verbose', action='store_true', help='Verbose build') '--verbose', action='store_true', help='Verbose build')
parser.add_argument( parser.add_argument(
'--output', action='store', help='Build output directory') '--output', action='store', help='Build output directory')
parser.add_argument(
'--ffmpeg', action='store_true', help='Build with ffmpeg')
parser.add_argument('--install-tooling', parser.add_argument('--install-tooling',
action='store_true', help='Install tooling') action='store_true', help='Install tooling')
parser.add_argument('--bundles', nargs='+', parser.add_argument('--bundles', nargs='+',
@ -74,10 +69,6 @@ def build(component: str, bundles: List[str] = None):
def build_daemon(): def build_daemon():
'''Builds daemon''' '''Builds daemon'''
cargo('fetch', 'mediarepo-daemon') cargo('fetch', 'mediarepo-daemon')
if not ffmpeg:
cargo('build --release --frozen --no-default-features', 'mediarepo-daemon')
else:
cargo('build --release --frozen', 'mediarepo-daemon') cargo('build --release --frozen', 'mediarepo-daemon')
if windows: if windows:

Loading…
Cancel
Save