]> gitweb.fluxo.info Git - hydra.git/commitdiff
Fix: hydractl: sync-media: sync_media_add_metadata: restrict playlist handling only...
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 19 Oct 2023 19:05:31 +0000 (16:05 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 19 Oct 2023 19:05:31 +0000 (16:05 -0300)
share/hydractl/sync-media

index 0bad6f006f8fc0718676466fd62fddbb24eab895..f3cd9733b9ac51e9f8f5544d0ff0060378cd2b16 100755 (executable)
@@ -54,9 +54,11 @@ function sync_media_add {
 
 # Add meta files, making sure they're handled directly by Git
 function sync_media_add_metadata {
-  # Playlist files
-  find -name '*.m3u' -type l -exec git annex unlock {} \;
-  find -name '*.m3u'         -exec git add {} \;
+  # Playlist files in the playlist folder
+  if [ -d "playlists" ]; then
+    find playlists -name '*.m3u' -type l -exec git annex unlock {} \;
+    find playlists -name '*.m3u'         -exec git add {} \;
+  fi
 
   # Koreader metadata files
   find -name metadata.pdf.lua     -type l -exec git annex unlock {} \;