Skip to content

Commit 0aa81b8

Browse files
committed
fix: add warning for missing plex token
1 parent 26becfa commit 0aa81b8

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ run:
3232
REPLEX_DISABLE_USER_STATE=0 \
3333
REPLEX_ENABLE_CONSOLE=0 \
3434
REPLEX_CACHE_TTL=600 \
35-
REPLEX_NTF_WATCHLIST_FORCE=1 \
3635
RUST_LOG="info,replex=info" \
36+
REPLEX_NTF_WATCHLIST_FORCE=1 \
3737
RUSTFLAGS=-Awarnings \
3838
cargo watch -w src -x run
3939

src/main.rs

+9-5
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@ use tracing_subscriber::prelude::*;
1515
#[tokio::main]
1616
async fn main() {
1717
let config: Config = Config::figment().extract().unwrap();
18-
if config.host.is_none() {
19-
tracing::error!("REPLEX_HOST is required. Exiting");
20-
return;
21-
}
22-
18+
2319
// set default log level
2420
if let Err(i) = env::var("RUST_LOG") {
2521
env::set_var("RUST_LOG", "info")
@@ -62,6 +58,14 @@ async fn main() {
6258
// .with(otlp_layer)
6359
.with(fmt_layer)
6460
.init();
61+
62+
if config.host.is_none() {
63+
tracing::error!("REPLEX_HOST is required. Exiting");
64+
return;
65+
}
66+
if config.token.is_none() {
67+
tracing::warn!("REPLEX_TOKEN not defined. Hero art might not load correctly.");
68+
}
6569

6670
// spawn our background task
6771
// let mut plex_client = PlexClient::dummy();

0 commit comments

Comments
 (0)