Skip to content

Commit

Permalink
Fixed throwing error when tags can't be written to path. (#690)
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTV12345 authored Apr 2, 2024
1 parent 106910e commit 06e1b97
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/service/download_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,13 @@ impl DownloadService {
}
}

tag.write_to_path(paths.filename, Version::Id3v24)
let write_succesful = tag.write_to_path(paths.filename, Version::Id3v24)
.map(|_| ())
.map_err(|e| CustomError::Conflict(e.to_string()))?;
.map_err(|e| CustomError::Conflict(e.to_string()));

if write_succesful.is_err() {
log::error!("Error writing metadata: {:?}", write_succesful.err().unwrap());
}
Ok(())
}
}

0 comments on commit 06e1b97

Please sign in to comment.