# 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 {} \;