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 \
wget \
pkg-config \
libavutil-dev \
libavformat-dev \
libavcodec-dev \
libavfilter-dev \
libavdevice-dev \
clang \
nodejs \
npm \
@ -39,4 +34,4 @@ ENV PATH="/root/.cargo/bin:${PATH}"
RUN python3 scripts/clean.py
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:
```sh
$ ./scripts/build.py all --ffmpeg
$ ./scripts/build.py all
```
Daemon only:
```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:
```sh
$ ./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"
[dependencies]
tracing = "0.1.30"
tracing = "0.1.31"
toml = "0.5.8"
structopt = "0.3.26"
glob = "0.3.0"
@ -25,7 +25,7 @@ tracing-appender = "0.2.0"
tracing-log = "0.1.2"
rolling-file = "0.1.0"
num-integer = "0.1.44"
console-subscriber = "0.1.1"
console-subscriber = "0.1.3"
log = "0.4.14"
[dependencies.mediarepo-core]
@ -38,13 +38,9 @@ path = "mediarepo-logic"
path = "./mediarepo-socket"
[dependencies.tokio]
version = "1.16.1"
version = "1.17.0"
features = ["macros", "rt-multi-thread", "io-std", "io-util"]
[dependencies.tracing-subscriber]
version= "0.3.8"
version= "0.3.9"
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"
itertools = "0.10.3"
glob = "0.3.0"
tracing = "0.1.30"
tracing = "0.1.31"
data-encoding = "2.3.2"
tokio-graceful-shutdown = "0.4.3"
[dependencies.thumbnailer]
version = "0.3.0"
default-features = false
thumbnailer = "0.4.0"
[dependencies.sea-orm]
version = "0.6.0"
default-features = false
[dependencies.sqlx]
version = "0.5.10"
version = "0.5.11"
default-features = false
features = ["migrate"]
[dependencies.tokio]
version = "1.16.1"
version = "1.17.0"
features = ["fs", "io-util", "io-std"]
[dependencies.config]
version = "0.11.0"
version = "0.12.0"
features = ["toml"]
[dependencies.mediarepo-api]
path = "../../mediarepo-api"
features = ["bromine"]
[features]
default = []
ffmpeg = ["thumbnailer/ffmpeg"]

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

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

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

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

@ -9,7 +9,6 @@ from typing import List
build_output = 'out'
verbose = False
ffmpeg = False
install_tooling = False
windows = os.name == 'nt'
@ -21,12 +20,10 @@ def main():
global install_tooling
global build_output
global verbose
global ffmpeg
global install_tooling
build_output = opts.output if opts.output else build_output
verbose = opts.verbose
ffmpeg = opts.ffmpeg
install_tooling = opts.install_tooling
build(opts.component, opts.bundles)
@ -41,8 +38,6 @@ def parse_args():
'--verbose', action='store_true', help='Verbose build')
parser.add_argument(
'--output', action='store', help='Build output directory')
parser.add_argument(
'--ffmpeg', action='store_true', help='Build with ffmpeg')
parser.add_argument('--install-tooling',
action='store_true', help='Install tooling')
parser.add_argument('--bundles', nargs='+',
@ -74,11 +69,7 @@ def build(component: str, bundles: List[str] = None):
def build_daemon():
'''Builds 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:
store_artifact('mediarepo-daemon/target/release/mediarepo-daemon.exe')

Loading…
Cancel
Save