aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2023-10-19 16:05:31 -0300
committerSilvio Rhatto <rhatto@riseup.net>2023-10-19 16:05:31 -0300
commit2368822db564cd0b71276f9af4741a7ad06fc55c (patch)
treeb3b4c0f6001b0fb2178732d419d198806eff6328
parent2b0af87b46f816fdf14572a240862818e576f676 (diff)
downloadhydra-2368822db564cd0b71276f9af4741a7ad06fc55c.tar.gz
hydra-2368822db564cd0b71276f9af4741a7ad06fc55c.tar.bz2
Fix: hydractl: sync-media: sync_media_add_metadata: restrict playlist handling only to the playlists folder
-rwxr-xr-xshare/hydractl/sync-media8
1 files changed, 5 insertions, 3 deletions
diff --git a/share/hydractl/sync-media b/share/hydractl/sync-media
index 0bad6f0..f3cd973 100755
--- a/share/hydractl/sync-media
+++ b/share/hydractl/sync-media
@@ -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 {} \;