Skip to content

Commit

Permalink
cargo fmt & update to version 0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
wsyxbcl committed Dec 5, 2024
1 parent c1de7a8 commit b17f0c6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ default-run = "serval"
description = "Serval helps you prepare data for Maze and Trapper"
repository = "https://github.com/wsyxbcl/Serval"
authors = ["wsyxbcl <wsyxbcl@gmail.com>"]
version = "0.2.20"
version = "0.3.1"
edition = "2021"
license = "GPL-3.0-or-later"
keywords = ["camtrap", "camera-trap"]
Expand Down
11 changes: 3 additions & 8 deletions src/tags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,7 @@ pub fn init_xmp(working_dir: PathBuf) -> anyhow::Result<()> {
for media in media_paths {
let mut media_xmp = XmpFile::new()?;
if media_xmp
.open_file(
media.clone(),
OpenFileOptions::default().repair_file(),
)
.open_file(media.clone(), OpenFileOptions::default().repair_file())
.is_ok()
{
let xmp_path = working_dir.join(append_ext("xmp", media.clone())?);
Expand Down Expand Up @@ -192,10 +189,8 @@ fn retrieve_metadata(
}
// Retrieve digikam taglist and datetime from file
let mut f = XmpFile::new()?;

if f.open_file(file_path, OpenFileOptions::default())
.is_ok()
{

if f.open_file(file_path, OpenFileOptions::default()).is_ok() {
if let Some(xmp) = f.xmp() {
if let Some(value) = xmp.property_date(xmp_ns::EXIF, "DateTimeOriginal") {
datetime = ignore_timezone(value.value.to_string())?;
Expand Down

0 comments on commit b17f0c6

Please sign in to comment.