From 2c2310a2482cd8a454f92e46dc3de5d33e57fcbb Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 30 Jul 2023 20:48:08 -0300 Subject: Feat: sync-media: handle Darktable sidecard files --- share/hydractl/sync-media | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'share') diff --git a/share/hydractl/sync-media b/share/hydractl/sync-media index 3d1199d..4f9ea7d 100755 --- a/share/hydractl/sync-media +++ b/share/hydractl/sync-media @@ -40,7 +40,7 @@ function sync_media_add { git add playlists fi - # Adding hidden files and symlinks, git+while version + # Adds hidden files and symlinks, git+while version git status --porcelain -u | grep '^?? ' | sed -e 's/?? //' | while read file; do if [ -h "$file" ]; then git add "$file" @@ -50,14 +50,17 @@ function sync_media_add { done } -# Add meta files +# Add meta files, making sure they're handled directly by Git function sync_media_add_metadata { - # Make sure these are handled by Git directly # Koreader metadata files find -name metadata.pdf.lua -exec git annex unlock {} \; find -name metadata.pdf.lua -exec git add {} \; find -name metadata.pdf.lua.old -exec git annex unlock {} \; find -name metadata.pdf.lua.old -exec git add {} \; + + # Darktable sidecar files + find -name '*.xmp' -exec git annex unlock {} \; + find -name '*.xmp' -exec git add {} \; } # If there is a playlists folder, make sure mpd user can write to it -- cgit v1.2.3