Bembel-B Blog

2007/12/06

Alternative Album Art with foobar2000 and PanelsUI

Filed under: Album Art,Cover Art,FofR,foobar2000,PanelsUI,software,Windows — FrankZabbath @ 01:52

Recently I took a second look at the foobar2000 Audioplayer for Windows and explored the gigantic possibilities of visual customization. After playing around a bit I was stuck with PanelsUI User Interface and especially the FofR Theme. It took me over an hour to figure out how to be able to use a list of alternative album art filename patterns, instead of the default folder.jpg.
Foobar2000 Logo
General information can be found at the FofR Configuration Guide.

The result isn’t quite optimal yet, as for the selection and priorities of the actual filename filters. But that’s a thing to be fine tuned. My solution works by checking if the filenames defined by the filters (from first line to the last) are existing. It stops if one file is found.

Here’s the complete code for User Globals (only coverPath lines are relevant for this regard of course):

$puts(coverPath,$replace(%path%,%filename_ext%,folder.*))
$if($not($fileexists($get(coverPath))),$puts(coverPath,$replace(%path%,%filename_ext%,cover.*)))
$if($not($fileexists($get(coverPath))),$puts(coverPath,$replace(%path%,%filename_ext%,*front.jpg)))
$if($not($fileexists($get(coverPath))),$puts(coverPath,$replace(%path%,%filename_ext%,*front*.jpg)))
$if($not($fileexists($get(coverPath))),$puts(coverPath,$replace(%path%,%filename_ext%,*cover.jpg)))
$if($not($fileexists($get(coverPath))),$puts(coverPath,$replace(%path%,%filename_ext%,*cover*.jpg)))
$if($not($fileexists($get(coverPath))),$puts(coverPath,$replace(%path%,%filename_ext%,00*.jpg)))
$if($not($fileexists($get(coverPath))),$puts(coverPath,$replace(%path%,%filename_ext%,*%album%.jpg)))
$if($not($fileexists($get(coverPath))),$puts(coverPath,$replace(%path%,%filename_ext%,*%album%*.jpg)))
$if($not($fileexists($get(coverPath))),$puts(coverPath,$replace(%path%,%filename_ext%,*.jpg)))
$if($not($fileexists($get(coverPath))),$puts(coverPath,$replace(%path%,%filename_ext%,*.png)))
$if($not($fileexists($get(coverPath))),$puts(coverPath,$replace(%path%,%filename_ext%,*.bmp)))
$puts(artistPath,C:\Programme\foobar2000\artist_images\%artist%.*)
$puts(userFont,Tahoma)
$puts(userFontSize,9)

This also defines the artist images to be found in C:\Programme\foobar2000\artist_images\%artist%.*, instead of the default %path%\artist.*.

Advertisements

Create a free website or blog at WordPress.com.