[filldb] fix symlink album covers + update id3

This commit is contained in:
Mark 2024-12-31 09:57:15 +01:00
parent 4996cc2e27
commit a8e18abfd2
2 changed files with 3 additions and 3 deletions

View File

@ -6,6 +6,6 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
id3 = "1.7.0" id3 = "1.16.0"
mp3-duration = "0.1.10" mp3-duration = "0.1.10"
musicdb-lib = { version = "0.1.0", path = "../musicdb-lib" } musicdb-lib = { version = "0.1.0", path = "../musicdb-lib" }

View File

@ -434,9 +434,9 @@ fn get_cover(
if let Ok(files) = fs::read_dir(&abs_dir) { if let Ok(files) = fs::read_dir(&abs_dir) {
for file in files { for file in files {
if let Ok(file) = file { if let Ok(file) = file {
if let Ok(metadata) = file.metadata() {
if metadata.is_file() {
let path = file.path(); let path = file.path();
if let Ok(metadata) = path.metadata() {
if metadata.is_file() {
if path.extension().and_then(|v| v.to_str()).is_some_and(|v| { if path.extension().and_then(|v| v.to_str()).is_some_and(|v| {
matches!(v.to_lowercase().as_str(), "png" | "jpg" | "jpeg") matches!(v.to_lowercase().as_str(), "png" | "jpg" | "jpeg")
}) { }) {