fix: log probe error
This commit is contained in:
parent
9f78c1a54f
commit
f3989ba244
@ -1,7 +1,7 @@
|
|||||||
use crate::analytics::Analytics;
|
use crate::analytics::Analytics;
|
||||||
use crate::settings::Settings;
|
use crate::settings::Settings;
|
||||||
use anyhow::Error;
|
use anyhow::Error;
|
||||||
use log::{info, warn};
|
use log::{debug, warn};
|
||||||
use nostr::serde_json;
|
use nostr::serde_json;
|
||||||
use reqwest::ClientBuilder;
|
use reqwest::ClientBuilder;
|
||||||
use rocket::Request;
|
use rocket::Request;
|
||||||
@ -61,7 +61,7 @@ impl PlausibleAnalytics {
|
|||||||
.send()
|
.send()
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
Ok(_v) => info!("Sent {:?}", msg),
|
Ok(_v) => debug!("Sent {:?}", msg),
|
||||||
Err(e) => warn!("Failed to track: {}", e),
|
Err(e) => warn!("Failed to track: {}", e),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,8 @@ impl MediaMetadata {
|
|||||||
for file in to_migrate {
|
for file in to_migrate {
|
||||||
// probe file and update metadata
|
// probe file and update metadata
|
||||||
let path = self.fs.get(&file.id);
|
let path = self.fs.get(&file.id);
|
||||||
if let Ok(data) = probe_file(&path) {
|
match probe_file(&path) {
|
||||||
|
Ok(data) => {
|
||||||
let bv = data.best_video();
|
let bv = data.best_video();
|
||||||
let duration = if data.duration < 0.0 {
|
let duration = if data.duration < 0.0 {
|
||||||
None
|
None
|
||||||
@ -55,8 +56,10 @@ impl MediaMetadata {
|
|||||||
{
|
{
|
||||||
error!("Failed to update metadata: {}", e);
|
error!("Failed to update metadata: {}", e);
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
warn!("Skipping missing file: {}", hex::encode(&file.id));
|
Err(e) => {
|
||||||
|
warn!("Skipping missing file: {}, {}", hex::encode(&file.id), e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user