mirror of
https://github.com/CDrummond/bliss-analyser.git
synced 2025-04-08 05:00:02 +03:00
...and use ffprobe when updating tags.
This commit is contained in:
parent
32610f22b7
commit
5e5bd9841a
10
src/db.rs
10
src/db.rs
@ -6,6 +6,8 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
#[cfg(not(feature = "libav"))]
|
||||||
|
use crate::ffmpeg;
|
||||||
use crate::tags;
|
use crate::tags;
|
||||||
use bliss_audio::{Analysis, AnalysisIndex};
|
use bliss_audio::{Analysis, AnalysisIndex};
|
||||||
use indicatif::{ProgressBar, ProgressStyle};
|
use indicatif::{ProgressBar, ProgressStyle};
|
||||||
@ -284,7 +286,13 @@ impl Db {
|
|||||||
let track_path = mpath.join(&dbtags.file);
|
let track_path = mpath.join(&dbtags.file);
|
||||||
if track_path.exists() {
|
if track_path.exists() {
|
||||||
let path = String::from(track_path.to_string_lossy());
|
let path = String::from(track_path.to_string_lossy());
|
||||||
let ftags = tags::read(&path, false);
|
let mut ftags = tags::read(&path, false);
|
||||||
|
|
||||||
|
#[cfg(not(feature = "libav"))]
|
||||||
|
if ftags.is_empty() {
|
||||||
|
ftags = ffmpeg::read_tags(&path);
|
||||||
|
}
|
||||||
|
|
||||||
if ftags.is_empty() {
|
if ftags.is_empty() {
|
||||||
log::error!("Failed to read tags of '{}'", dbtags.file);
|
log::error!("Failed to read tags of '{}'", dbtags.file);
|
||||||
} else if ftags != dtags {
|
} else if ftags != dtags {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user