Many have asked for this, rather than rush out the first release I spent a while refining the code and commenting the various sections. Hopefully everything will be relatively understandable. All image sources are defined in variables at the top of the code, as are font sizes, colours and alignment variables. Please look at the readme.txt file which contains links and information about the required components, fonts and images. The code is in the new standard .pui format which should be placed in your " C:\Documents and Settings\USER\Application Data\foobar2000\PanelsUI" folder and loaded through Foobar2000's PanelsUI preferences dialogue.
The code has been released under the Creative Commons Attribution-NonCommercial
I am now openly accepting feature requests and answering questions. NOTE: For Single Column Playlist, Row Height: 17, Group Rows: 5 My Windows Visual Style is Inverso Reborn Balanced and a discussion and link can be found here. A good resource for downloading artist images is http://artists.trivialbeing.org
Components Required
- Latest Version of PanelsUI
- Quick Search
- Custom info
- CWB Hooks
- ColumnsUI
- Foo Run
- Album List Panel
- Windows Explorer Panel
- Bebas
- Calibri - Comes with Windows Vista and cannot be redistributed (but you may find a site that has it)
- BigNoodleTitling
Labels: Foobar
Video - Juno, I have lost my fangs
Video - What I have been watching lately
Images - Californication
Video - Haloid and Dead Fantasy
Video - Heroes
Video - How to do a press conference badly
Pop-up playlist, this appears beneath when thin (as below) and to the side when wide.
A pop-up menu, buttons and control panel
Im sure I will think of some much more advanced uses of this integration in the near future. But for now I think this is exciting enough. For those interested, to get going, the code for tabbed panels in PanelsUI is:
$select($add($getpvar(display.mode),1),
$panel(Option1,Track Display,0,20,%_width%,140,)
,
$panel(Option2,Album list,0,20,%_width%,140,)
,
$panel(Option3,Console,0,20,%_width%,140,)
)
$button2(0,160,0,0,14,14,button text,button text,'PVAR:SET:display.mode:0',)
$button2(14,160,0,0,14,14,button text, button text,'PVAR:SET:display.mode:1',)
$button2(28,160,0,0,14,14, button text,button text ,'PVAR:SET:display.mode:2',)
This simple example (that needs the button text replaced with a $font()text code) is the basis for tabs, clicking the first button shows the track display, the second an album list, third a console.
Still not happy, I looked into creating a web service, based on hydrogenaudio forums member Chronial's efforts and ultimately we developed an online resource for downloading artist images. I do not plan to make the code public, mainly at Chronial's request. I have created this service here: http://artists.trivialbeing.org/?a=ARTIST where ARTIST is the performer's image you are looking for, for instance:
http://artists.trivialbeing.org/?a=the microphones
http://artists.trivialbeing.org/?a=blondie
http://artists.trivialbeing.org/?a=radiohead
Images are first sourced from Last.fm before being cached so as not to cause any undue strain on last.fm's servers.
To make things more useful you can append the URL with &outputmode=img,
e.g. http://artists.trivialbeing.org/?a=blondie&outputmode=img
and a wrapper of sorts is available via http://artists.trivialbeing.org/pic/ARTIST.jpg
e.g. http://artists.trivialbeing.org/pic/blondie.jpg
which can be used on forums:
or in an artist download script. I use the URL2File command line application with this command:
URL2File http://artists.trivialbeing.org/pic/%1.jpg C:\artistimages\thumbnails\%1.jpg -o 60
Where %1 is the first parameter passed to the batch file and 60 is a one minute timeout.
Using a custom run component I can call this batch file using foobar and a keyboard shortcut or button; when passing the artist (%artist%) to the batch file you should take care to replace characters that cannot be used in creating windows filenames. Foreign characters work too, as do special characters such as the artist "Why?" or "Wham!".
When using image output, if no artist is found the script returns this image:
With regards to copyright issues, Last.fm's uploading policy states:
Because copyrighted images tend to be very restrictive about where they can be used we ask that you only upload images which are public domain, or that are explicitly licensed for promotional use. There are a number of places you can find images open to public use. First, try to find out if the artist has any promotional pictures on their official homepage (they usually do).
For those without foobar2000, I give an example of an alternative use. I took the recently played tracks RSS feed, played with it a little using magpierss and create a page that shows recent tracks along side artist images, an example can be found here:
http://fofr.trivialbeing.net/page.php?p=nowplaying
Labels: Foobar
+ some tweaks to multiple window / multiple playlists
+ added "Playing" playlist selection
+ $fileexists()
+ added NOKEEPASPECT option for images
+ added wildcard support for images
+ added alignment options for images VALIGN-T (vertical align-TOP), VALIGN-B, HALIGN-L, HALIGN-R
I have highlighted the key improvements that I am now making use of. With these new additions images can be stretched to fit a give frame, for example:
$imageabs2(100,100,,,100,100,5,,$replace(%path%,%filename_ext%,*.jpg),NOKEEPASPECT)
This will display an image (finds any .jpg in the song's directory thanks to the new wildcard function - * is the wildcard) and stretch it to fit a 100x100 frame. Expanding upon this using the new fileexists function:
$if($fileexists($replace(%path%,%filename_ext%,*.jpg)),
$puts(albumMarg,110)
$puts(datax,160)
$imageabs2(100,100,,,100,100,5,,$replace(%path%,%filename_ext%,*.jpg),NOKEEPASPECT)
$imageabs(5,,images/artoverlay-1.png ,)
$drawrect(5,0,100,100,brushcolor-null pencolor-0-0-0)
$drawrect(6,1,98,98,brushcolor-null pencolor-150-150-150)
,
$puts(albumMarg,10)
$puts(datax,60))
This checks that the images is there, if it is it defines a specific margin for later use in positioning of artist, album and trackinfo. It then draws the image, a PNG overlay and some surrounding borders. If the image doesn't exist it defines a different margin so that the song data does not surround an empty space and instead is closer to the left, for example:

