export-banshee-covers.sh 494 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. # http://askubuntu.com/questions/65323/bulk-export-embed-album-art-in-banshee
  3. TPATH="/home/bach/.cache/media-art/"
  4. LIBRARY_PATH="/home/bach/Musique/Library/"
  5. cd $LIBRARY_PATH
  6. for f in *; do
  7. cd "$f"
  8. for al in *; do
  9. THUMB="${TPATH}album-$(echo -ne "$f\t$al" | md5sum | cut -b1-32).jpg"
  10. if [ -e $THUMB ]; then
  11. cp $THUMB "./${al}/cover.jpg"
  12. echo "$LIBRARY_PATH/$f/$al/cover.jpg" >> ~/.bin/coverlog
  13. fi
  14. done
  15. cd ..
  16. done