2010-06-15, 01:04
On the Acer Revo and other similar devices, using .bmp images for your backdrops can really improve performance, especially in skins like Aeon.
I wrote a little script to automatically do this and just thought I would share it since I didn't find much when I searched for something like this.
You can put this in a file in /etc/cron.hourly , just don't forget to chmod +x the file after you create it. Oh, and don't use a file name with a "." in it for your script or run-parts (cron) won't pick it up.
This requires Imagemagick to do the conversion, so make sure you have that installed first.
I wrote a little script to automatically do this and just thought I would share it since I didn't find much when I searched for something like this.
You can put this in a file in /etc/cron.hourly , just don't forget to chmod +x the file after you create it. Oh, and don't use a file name with a "." in it for your script or run-parts (cron) won't pick it up.
Code:
#!/bin/bash
DIRS[1]=/home/xbmc/.xbmc/userdata/Thumbnails/Music/Fanart
DIRS[2]=/home/xbmc/.xbmc/userdata/Thumbnails/Video/Fanart
DIRS[3]=/home/xbmc/.xbmc/media/backdrops/pictures
DIRS[4]=/home/xbmc/.xbmc/media/backdrops/settings
for DIR in ${DIRS[@]}; do
(IFS=$'\n'
for i in `find $DIR -type f | fgrep -e bmp -e BMP -v`; do
FILENAME=`basename $i`
FILENAME_NOEXT=`echo $FILENAME | cut -d'.' -f1`
convert $i $DIR/$FILENAME_NOEXT.bmp
rm -f $i
done
)
done
This requires Imagemagick to do the conversion, so make sure you have that installed first.