aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2023-07-18 18:35:02 -0300
committerSilvio Rhatto <rhatto@riseup.net>2023-07-18 18:35:02 -0300
commit5f5e65cbe7809e8949afd2a3c8182d6b642171e2 (patch)
tree0988501a28237092cece80e92a6ee010f62b68df
parentc764b10fe91b85bfe6342592c4f8fc835892115e (diff)
downloadhydra-5f5e65cbe7809e8949afd2a3c8182d6b642171e2.tar.gz
hydra-5f5e65cbe7809e8949afd2a3c8182d6b642171e2.tar.bz2
Fix: sync-media: add meta files
-rwxr-xr-xshare/hydractl/sync-media11
1 files changed, 11 insertions, 0 deletions
diff --git a/share/hydractl/sync-media b/share/hydractl/sync-media
index 4f40a67..3d1199d 100755
--- a/share/hydractl/sync-media
+++ b/share/hydractl/sync-media
@@ -50,6 +50,16 @@ function sync_media_add {
done
}
+# Add meta files
+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 {} \;
+}
+
# If there is a playlists folder, make sure mpd user can write to it
function sync_media_playlist_perms {
if [ -d "playlists" ]; then
@@ -181,6 +191,7 @@ for folder in `ls $CACHE`; do
cd $CACHE/$folder
echo "Syncing $CACHE/$folder..."
+ sync_media_add_metadata
sync_media_playlist_perms
sync_media_ensure_remote $REMOTE $VOLUME/$MEDIA/$folder
sync_media_identity