View Single Post
qwazix's Avatar
Moderator | Posts: 2,622 | Thanked: 5,447 times | Joined on Jan 2010
#1
Disclaimer: I am not sure that all albums retain their art. Most of mine didn't have anyway, but those that I remeber having album art still have after applying the script and rebuilding tracker db. (rebuilding the db is NOT required I just did it for testing purposes)

Code:
#!/bin/sh
flag=0
#Recursively rename AlbumArt Files 
find MyDocs/.sounds/ -name AlbumArt* | while read FILE 
do 
flag=1
NEW=`echo $FILE | sed -e 's/AlbumArt/.AlbumArt/'`
echo "renaming $FILE to $NEW"
mv "$FILE" "$NEW"
done

find MyDocs/.sounds/ -name folder.jpg | while read FILE 
do 
flag=1
NEW=`echo $FILE | sed -e 's/folder/.folder/'`
echo "renaming $FILE to $NEW"
mv "$FILE" "$NEW"
done

if [ $flag -eq 0 ]
then 
echo "no files found" 
fi
Maybe you need another block for Folder.jpg, maybe it's better to hide all jpg's in .sounds. This did most of the trick for me, I'll do the rest by hand, if you make any changes post back.

edit: the script doesn't delete anything, it just recursively makes AlbumArtblahblah and folder.jpg's hidden
 

The Following 2 Users Say Thank You to qwazix For This Useful Post: