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

1 Comment »

  1. Hey, this layout helped me a lot mate!, I was just looking for one like this, I also was with the Fofr Configuration but now I’ve changed to “Elegance Theme”, it’s a little bit simplier than the other one, (and less resources). Now this code finds the real covers, in my case *Front*, and if it’s no there, it just puts the one is there(those images from album art :)), and that’s it!

    You solved my problem
    Thanks again!!
    Great.

    Comment by Alonso — 2007/12/31 @ 15:55 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: