February 21st, 2007, posted by FofR
Cover Art downloaders that utilise Amazon or another large online shop’s database of images are fairly well know and there’s a number of them to choose from. Artist images however are not so easy to come by. With Hydrogen Audio member Chronial’s help I set about creating a web based service that anyone can use as simply as possible to grab any artist’s picture and place it anywhere… whether it be through batch file downloading, foobar or elsewhere on the web.
The result is the aptly titled “Artist Images” site, located at http://artists.trivialbeing.org.
http://artists.trivialbeing.org/?a=ARTIST NAME
This page displays the artists thumbnail image and some information on how to use it, check out http://artists.trivialbeing.org/?a=blondie for instance. Maybe you want a bigger image, thumbnails too small? Simply append the URL with &imgs=large, for example http://artists.trivialbeing.org/?a=blondie&imgs=large.
This is all well and good for browsing but what’s the URL for including artist images either in a URLdownloader script or to include on forums etc.?
For a thumbnail, http://artists.trivialbeing.org/pic/blondie.jpg
For a full size image, http://artists.trivialbeing.org/bigpic/blondie.jpg
This URL will always return an image, if the file is not in the cache it will locate it, download it and still show you. Only a few results will return a “no artist” image result.
Now, the exciting bit. How do you integrate this into Foobar2000? Up until now I have been recommending URL2File, a command line downloading application that you need to first install and then script. There is now a better more succinct way using AutoHotKey. You can install this and run a .ahk if you want, or you can download a standalone compiled executable (i.e. I have done the work for you).
Download Large Artist Images .exe
Download Thumbnail Images .exe
The AHK code contained within is simply:
#NoTrayIcon
SetWorkingDir, %A_ScriptDir%
UrlDownloadToFile, http://artists.trivialbeing.org/bigpic/%1%.jpg, %1%.jpg
exit
Place these in any directory you want and pass the artist name as an input parameter to them. The file will be downloaded as a .jpg file to the folder that the executable is in.
e.g. running C:\artistimagethumb.exe “blondie” via the command line will download blondie.jpg and save it in the root C:\ directory.
To integrate this into foobar you will need Foo_Run. Under the Run Services option add a new service, call it what you like, make sure the path to the executable is correct. Now you need to add the parameter, e.g.:
“C:\artistimagebig.exe” $replace($replace(%artist%, ,+),&,and)
This passes the selected artist to the executable to be downloaded. If “system of a down” is selected it will be changed to “system+of+a+down”, all & characters will be replaced with “and”. Please note: \ / : * ? ” < > | are all characters that cannot be used in file naming, as a result any artists containing these characters will be upset to find out they won’t be getting a profile pic.
Now assign this to a keyboard shortcut and you’re there.
March 7th, 2007 at 6:02 am
This program is very nice! Thnx for making
I have assigned a run service in foobar2000 of this:
“C:\Program Files\foobar2000\artistimagebig.exe” “$replace($replace(%artist%, ,+),&,and)”
This downloads the artist image to my foobar2000 directory.
Is there any way of getting the image to download to the folder where the mp3 is stored?
Sorry if you have already explained this above. Still new at all this stuff.
Thnx
May 2nd, 2007 at 3:09 pm
I can’t remember, is there a program like this for album images?
Latarz.
May 31st, 2007 at 2:36 pm
Okay While this works it only works part of the Time at least for me. I followed the instructions and finally got it to work but foobar or whatever it uses to display the artist image will not recognize it if i left the + in the sting so I removed it.
That seemed to help but now if some images do not fit a exact even width x height format maybe (180 x180 and not something like 123×180 because that it doesn’t seem to display odd pixel numbered images ) it won’t display the and also you have to pause and then un-pause the music to have the image display.
Maybe having some setting to resize the image to whatever is downloaded would be good and also configure it to read the images when they’re format with the plus for example it won’t read a image that is “yoko+kanno.jpg” but if it’s “yokokanno.jpg” it’ll read the image.
I’d also like to see a setting is possible so you can use Artist image big or Artist image Thumb so if you format a file as “Yoko+Kanno+Big.jpg” and “Yoko+Kanno+Thumb.jpg” you can switch between using large and small images.
June 1st, 2007 at 2:43 am
These problems are mostly a limitation of PanelsUI I am afraid – its not possible to grab image dimensions.
I’ll look into the big/small thing.
June 1st, 2007 at 1:12 pm
Try using the command line:
“C:\Program Files\Foobar2000\Artists\artistimagebig.exe” $replace($replace(%artist%, ,” “),&,and)
so instead of using + the file names outputed use ” ” (ie. spaces).
Nice program!
June 11th, 2007 at 11:13 pm
Word, Nathan. If this program can download the artist images directly to the artist’s respective folder, this would rock even more. It makes me look less of an obsessive-compulsive prick, too. Heh.
June 12th, 2007 at 7:43 am
A cumbersome way of doing that would be to make and run a little batch script that copies the artistimagebig.exe file to the appropriate folder, executes it, then deletes it. Shouldn’t be too difficult. Though there may be problems in presenting special characters in the batch file.
June 12th, 2007 at 7:43 am
I’ll update the script in a short while.
July 30th, 2007 at 12:37 pm
How do you get to fetch the album as well ?
September 14th, 2007 at 6:12 am
hello, i can’t seem to get this to work.
i get it to download the image
but then when i try to view it, my image viewer says it’s not a valid file…am i doing something wrong ?
also,
“C:\program files\foobar2000\artistimagebig.exe” “$replace(%_path%,%_filename_ext%,)%artist%”
should put the image in the folder of the artist you are trying to get.