HydrogenAudio

Hosted Forums => foobar2000 => Uploads - (fb2k) => Topic started by: david_dl on 2006-04-08 06:30:15

Title: CoverDownloader
Post by: david_dl on 2006-04-08 06:30:15
New Version (Experimental):
Here's a new version I've been working on. For this you'll require .NET framework 2.0 installed.

Please report any bugs/glitches.

Latest version (Supports iTMS)
Download: [attachment=2550:attachment]
Source (GPL): [attachment=2548:attachment]

If you create anything useful with the source, it would be a good idea to upload it here for everyone to benefit. Note that I probably won't be updating this project again, except maybe to add scripts.
The license requires that you include full sourcecode with any modified version distributed.
It's messy code, and the first and only time I've used C#, so I hope it's of use to someone.

Included site scripts:Screenshot:
(http://img106.imageshack.us/img106/163/monitorcapture10june2006143052.th.png) (http://img106.imageshack.us/img106/163/monitorcapture10june2006143052.png)

---------Old Version-----------

This version uses Python scripts to specify sources for cover art. Look in the CoverSources\Scripts folder for more details. Walmart.py is a good template if you wish to write your own (Amazon.py is a mess)

The commandline syntax is quite simple, just coverart.exe <Artist> <Album> <File to save to>
The second two parameters are optional, if a path is not specified it will prompt you with a Save As dialog.

You shouldn't require any VC8 runtimes; it's linked statically.

Extract the entire archive into one folder, there is no need to unzip or do anything with Python24.zip, this is the library for the built-in interpreter and can be read from the zip file.

Note: The scripts in this download file are NOT up to date. Use the scripts attached to this post. Put them in coversources\scripts
Download links:
Download here (http://www.hydrogenaudio.org/forums/index.php?act=Attach&type=post&id=2227)
Download source here (http://www.hydrogenaudio.org/forums/index.php?act=Attach&type=post&id=2228)

Updated Scripts for Rate Your Music and Amazon are attached (these are recommended over the ones included in the download archive, for example the Amazon script no longer returns results that don't have valid thumbnails)

Commandline for foo_run:
Code: [Select]
"C:\Program Files\foobar2000\coverart\coverart.exe" "%artist%" "%album%" "$replace(%_path%,%_filename_ext%,)folder.jpg"

Screenshot:

(http://daviddl.orcon.net.nz/coverthumb7.PNG) (http://daviddl.orcon.net.nz/coverart7.PNG)[/s]
Title: CoverDownloader
Post by: david_dl on 2006-04-08 11:14:09
And it won't work on Windows 98/95/ME 'cos it's unicode.
Title: CoverDownloader
Post by: The Link on 2006-04-08 12:16:41
The Amazon.dll doesn't seem to work. I only get Walmart results. Disabling Walmart.dll gives no results at all.
Title: CoverDownloader
Post by: SpaceChief on 2006-04-08 18:03:13
Thanks! Works great so far!
Title: CoverDownloader
Post by: drbeachboy on 2006-04-08 20:24:31
With Amazon, I get a window panel that says "Done", but blank inside. Walmart works like a champ!

On the Walmart side, is this better or the same as the gui "albumart.exe" that you wrote back in January?



Regards,
Dirk
Title: CoverDownloader
Post by: david_dl on 2006-04-08 21:51:56
Hmm, it would seem that the Amazon site's behaviour varies wildly depending on cookies you have set and possibly geographical location. What happens if you visit http://www.amazon.com/exec/obidos/search-h...ece%20of%20mind (http://www.amazon.com/exec/obidos/search-handle-url/?%5Fencoding=UTF8&dym=0&search-type=ss&index=music&field-keywords=iron%20maiden%20piece%20of%20mind)
using Internet Explorer (not firefox). Do you get results? And does coverdownloader work after that?

Quote
On the Walmart side, is this better or the same as the gui "albumart.exe" that you wrote back in January?


If you mean the .NET one, its almost the same except written in C++ so you don't require the .NET framework. You should get identical results.
Title: CoverDownloader
Post by: The Link on 2006-04-08 22:06:41
Your link gives results here using IE but coverart still doesn't give me any amazon results after that (only Walmart works).
Title: CoverDownloader
Post by: david_dl on 2006-04-08 23:01:47
Could you send me the HTML source of that results page?
Thanks for your help.
Title: CoverDownloader
Post by: tool++ on 2006-04-08 23:11:03
Ah, been waiting for something like this.

However, Amazon doesnt work, and the wallmart searching is rubbish.
Title: CoverDownloader
Post by: The Link on 2006-04-08 23:11:49
Could you send me the HTML source of that results page?
Thanks for your help.

See PM.
Title: CoverDownloader
Post by: david_dl on 2006-04-08 23:47:44
Thanks for that. I've had a look at the page Amazon.com served you, and I'm unable to get it to serve me one that looks anything like that. As these pages tend to change quite frequently anyway, I think it would be best to implement some sort of scripting instead of using compiled DLLs. What scripting languages would you like me to try to support? Anything that supports regular expressions should work well for parsing the pages, and as long as the integration into a C/C++ application isn't too difficult I'm willing to support it. I can provide the HTTP and  file IO services needed if the scripting language doesn't support them.

ATM I'm thinking python and/or lua, however I don't actually know how to write script in either of these languages
Title: CoverDownloader
Post by: fluffy on 2006-04-09 00:36:18
How am I supposed to install this?  I copied everything that was in the rar into my components directroy, and I don't get any errors when foobar starts up.  But, what do I do now?  There is no mention of this component in my preferences now, when I right-click on the albumart panel there is no option to download art...
Title: CoverDownloader
Post by: david_dl on 2006-04-09 00:47:25
It's not a foobar component... yet. Run coverart.exe from the commandline.

the wallmart searching is rubbish.


I know what you mean. If you know of any better sites, please post them here.
Title: CoverDownloader
Post by: Skates on 2006-04-09 15:48:11
Another source of info:

http://www.allmusic.com/ (http://www.allmusic.com/)
Title: CoverDownloader
Post by: fluffy on 2006-04-11 19:53:40
Not sure if this could be added, but hi-res and easy (for a human) to use: http://www.thejosher.net/iTunes/search.php (http://www.thejosher.net/iTunes/search.php)
Title: CoverDownloader
Post by: francesco on 2006-04-13 10:57:17
does it work with foobar 0.8.3
because to me it does not work
Title: CoverDownloader
Post by: kalmark on 2006-04-13 11:29:43
does it work with foobar 0.8.3
because to me it does not work

It's not a foobar component... yet. Run coverart.exe from the commandline.
Title: CoverDownloader
Post by: reprehensible on 2006-04-16 20:09:02
Thanks for that. I've had a look at the page Amazon.com served you, and I'm unable to get it to serve me one that looks anything like that. As these pages tend to change quite frequently anyway, I think it would be best to implement some sort of scripting instead of using compiled DLLs. What scripting languages would you like me to try to support? Anything that supports regular expressions should work well for parsing the pages, and as long as the integration into a C/C++ application isn't too difficult I'm willing to support it. I can provide the HTTP and  file IO services needed if the scripting language doesn't support them.


Okay, wait.  Are you trying to screen-scrape Amazon pages?  Why?!  They have an API specifically for querying their database, and it is very easy to download cover art with it.

http://www.amazon.com/gp/aws/landing.html (http://www.amazon.com/gp/aws/landing.html)

There are a number of examples out on the web.  You can write a reasonably okay version in an hour or so, including the time it takes to register with Amazon.
Title: CoverDownloader
Post by: hexonn on 2006-04-16 20:31:45
It's not a foobar component... yet. Run coverart.exe from the commandline.


the wallmart searching is rubbish.


I know what you mean. If you know of any better sites, please post them here.
coconuts.com has 500x500 covers
Title: CoverDownloader
Post by: karit on 2006-04-16 21:32:09
Not sure if this could be added, but hi-res and easy (for a human) to use: http://www.thejosher.net/iTunes/search.php (http://www.thejosher.net/iTunes/search.php)

http://www.hydrogenaudio.org/forums/index....showtopic=40067 (http://www.hydrogenaudio.org/forums/index.php?showtopic=40067)
HAs commandline. And also a gui but haven't used the gui
Title: CoverDownloader
Post by: mazy on 2006-04-16 22:09:33
david_dl, please, would you consider using lua language for scripting? it has good support for regular expressions - and foosion did quite some work on his foo_lua component to implement unicode support to them.

on a sidenote, it would be great if you could port his old foo_lua sources to foobar 0.9. i really miss it, it could be used for so many useful things (and maybe one could even implement some sort of service so other plugins could use that lua core too).
Title: CoverDownloader
Post by: david_dl on 2006-04-20 02:52:40
Thanks for all the suggestions of cover sources.
I'm just posting to let you know I haven't abandoned this, just been busy with other stuff. I had some time today so I started playing with scripting. I thought python looked quite good, so I've created a coversource DLL that uses a python script to retrieve covers. It needs a bit of work before I can release it, but that will happen sometime soon.
I don't actually know python, but after a bit of playing around I found it to be quite a fun language, and very intuitive to use. Just to show you how easy it is, this script, when run by the python coversource provides all the functionality of Walmart.dll in a few lines:
Code: [Select]
import urllib
import re

# GetThumbs(): 'artist' & 'album' are unicode strings
# must return a list of elements in this format:
# (all returned strings can be standard or unicode)
# [string: name,string: url to thumbnail OR buffer containing image data (prefixed with 'data://'): thumbnail data,anything: callback data]
# The callback data will be passed to DownloadArt if/when it is called

def GetThumbs(artist,album):
out=[]
params = urllib.urlencode({'search_query': artist + "+" + album})
f = urllib.urlopen("http://www.walmart.com/catalog/search-ng.gsp?Continue.x=0&Continue.y=0&Continue=Find&ics=20&ico=0&search_constraint=4104&" + params)
rfirst = re.compile("<a\\shref=\"/catalog/product\\.do\\?product_id=[0-9]+\"><img\\ssrc=\"([^\"]+)60X60.gif\"[^>]+alt=\"([^\"]*)\"[^>]*>",re.MULTILINE)
text = buffer(f.read())
iterator = rfirst.finditer(text)
for match in iterator:
out.append([match.group(2),u"150x150",match.group(1)+"150X150.jpg",match.group(1)])
return out

# alternate 'for' loop contents:
# f = urllib.urlopen(match.group(1)+"150X150.jpg")
# out.append([match.group(2),u"150x150","data://"+f.read(),match.group(1)])

# GetCover(): 'userdata' is the last item in the array representing
# the desired thumbnail in the list you returned in GetThumbs()
# must return either the URL of the full-size art
# or, the actual image data (prefixed with 'data://') as before

def GetCover(param):
return param + "500X500.jpg"

[!--sizeo:1--][span style=\"font-size:8pt;line-height:100%\"][!--/sizeo--]moderation: Converted code to codebox to preserve forum layout.[/size]
Title: CoverDownloader
Post by: DoXer on 2006-04-23 20:48:47
How can i send the parameters for %artist% and %title% from foobar to the downloader. Ist there a plugin required?
Title: CoverDownloader
Post by: Skates on 2006-04-23 21:38:26
Cannot wait until this is turned into an actual plug-in or merged with the other album art plugin!!!
Title: CoverDownloader
Post by: david_dl on 2006-05-14 00:45:12
Well, the python scripting kinda works. But I no longer can work on this, and its become kind of a mess.
Here's a binary and the source code, use parts of it in your own project if you want.

To use, run coverart.exe from the commandline. The zip file python24.zip contains python libraries, there is no need to unzip it, as it can be read from as is.

If you want to write your own script, see coversources\scripts\walmart.py for details. The amazon script is a mess.
Title: CoverDownloader
Post by: topdownjimmy on 2006-05-14 01:58:41
How can i send the parameters for %artist% and %title% from foobar to the downloader. Ist there a plugin required?

once we get foo_openwith ported to 0.9, this will be very simple



i'd also like to suggest http://www.rateyourmusic.com/ (http://www.rateyourmusic.com/) for finding album art, it's far and away the most comprehensive collection of album art i've found, i find everything except super, super rare stuff on there.  fantastic resource.
Title: CoverDownloader
Post by: david_dl on 2006-05-14 02:33:07
i'd also like to suggest http://www.rateyourmusic.com/ (http://www.rateyourmusic.com/) for finding album art, it's far and away the most comprehensive collection of album art i've found, i find everything except super, super rare stuff on there.  fantastic resource.


Here's a script for that. Save as "Rate Your Music.py" in coversources\scripts:
Code: [Select]
import urllib
import re

def GetThumbs(artist,album):
    try:
        out = []
        query = album
        params = urllib.urlencode({'searchterm': query.encode('utf8')}) + "&type=l"
        f = urllib.urlopen("http://rateyourmusic.com/search?" + params)
        r = re.compile("<img[^>]*?alt=\"([^\"]*)\"[^>]*?src=\"/album_images[0-9]*/s([0-9]+).jpg\">",re.MULTILINE)
        text = f.read()
        iterator = r.finditer(text)
        for match in iterator:
            out.append([match.group(1),u"Unknown","http://rateyourmusic.com/album_images/s"+match.group(2)+".jpg",match.group(2)])
        return out
    except:
        return []

def GetCover(param):
    return "http://rateyourmusic.com/album_images/o"+param+".jpg"
Title: CoverDownloader
Post by: parive3 on 2006-05-23 10:43:34
Is there some readme.txt file for noobs like me too know where to place the extracted folders and how to use the program?

Edit - Ok got its only a Command line app
Title: CoverDownloader
Post by: david_dl on 2006-06-01 05:15:11
Sorry for the belated reply. Now that foo_run has been ported, the easiest way to use it is with the code I have added to the first post. Then rightclick the track for which you need art, select Run->Get Art (or whatever you called it in foo_run).

Rate Your Music is indeed an excellent source of coverart, I recommend adding the python script for it I posted above.

Edit: Everything is now on the first post, including updated scripts
Title: CoverDownloader
Post by: Tich on 2006-06-01 15:48:38
thanks for your fantastic work 

edit: I'm having some problems downloading certain coverart.
For example I tried downloading the cover for "Macka B - Sign Of The Times" which yields one correct result on amazon. When clicking the picture to save it everything seems fine, but the picture is a 1x1 pixel white gif (as far as Irfanview goes)

This occurs using the latest version of your amazon script and the following command prompt using foo_run:
"C:\Programme\foobar2000\coverart\coverart.exe" "%artist%" "%album%" "$replace(%_path%,%_filename_ext%,)%artist% - %album% - Front.jpg"
I've also downloaded other cover images which work fine, as far as I can tell this only happens with amazon
Title: CoverDownloader
Post by: Chaser on 2006-06-01 16:41:09
Indeed!
Thank you very much!

A little question: What is done, if the specified file (i.e. folder.jpg) already exists? Is it overwritten?
A little request: What about letting the uppopping window with covers hide the command-box and put out the errors and such not to the command-box, but rather to this window in some way? But this is only eyecandy...

I saw a few times, that a coverpreview was empty, with a black border and a few horizontal lines. If I see this again I'll report you the artist and album!
Title: CoverDownloader
Post by: topdownjimmy on 2006-06-01 18:05:42
A million thank yous for this program, and for providing RateYourMusic support.  It all makes me very very happy. 

One question: with free registration at RateYourMusic, you sometimes have access to higher-resolution images.  Is it at all possible to integrate logging in to the script to get these bigger images?

edit: another request, can you make the program close automatically when the art is saved?
Title: CoverDownloader
Post by: david_dl on 2006-06-01 20:30:54
edit: I'm having some problems downloading certain coverart.
For example I tried downloading the cover for "Macka B - Sign Of The Times" which yields one correct result on amazon. When clicking the picture to save it everything seems fine, but the picture is a 1x1 pixel white gif (as far as Irfanview goes)

This occurs using the latest version of your amazon script and the following command prompt using foo_run:
"C:\Programme\foobar2000\coverart\coverart.exe" "%artist%" "%album%" "$replace(%_path%,%_filename_ext%,)%artist% - %album% - Front.jpg"
I've also downloaded other cover images which work fine, as far as I can tell this only happens with amazon


Does that result show an image in the thumbnail? Are you using the latest version of the Amazon script (It's at the very bottom of the first post.) If the problem persists i'll have another fiddle with the script when I get home tonight (It uses the Web Services API and the URLs it gives me are, for some reason, not very reliable


Indeed!
Thank you very much!

A little question: What is done, if the specified file (i.e. folder.jpg) already exists? Is it overwritten?
A little request: What about letting the uppopping window with covers hide the command-box and put out the errors and such not to the command-box, but rather to this window in some way? But this is only eyecandy...

Hmm yes, that would be better. If i have time, I'll work on it tonight.

I saw a few times, that a coverpreview was empty, with a black border and a few horizontal lines. If I see this again I'll report you the artist and album!

Thanks, that would be very helpful.

A million thank yous for this program, and for providing RateYourMusic support.  It all makes me very very happy. 

One question: with free registration at RateYourMusic, you sometimes have access to higher-resolution images.  Is it at all possible to integrate logging in to the script to get these bigger images?

Hi, when I wrote the script I signed up for an account, and noticed that while it was necessary to login to get the link to the larger images, once you had the URL anyone could access it. I also found that the URL was very predictable, and therefore logging in wasn't necessary at all.
However out of fairness to the Rate Your Music site, please only use the script if you are a regular user who participates on the site 

edit: another request, can you make the program close automatically when the art is saved?


Sure, would it be good to have this as a commandline argument? Ie. coverart.exe --auto-close "artist"
Title: CoverDownloader
Post by: topdownjimmy on 2006-06-01 20:48:56

edit: another request, can you make the program close automatically when the art is saved?


Sure, would it be good to have this as a commandline argument? Ie. coverart.exe --auto-close "artist"

perfect, thanks!
Title: CoverDownloader
Post by: bsommer on 2006-06-01 22:16:07
when you guys say run coverart.exe from the commandline what do you mean?

I extracted it into a folder but how do i run the .exe from the "commandline"?
Title: CoverDownloader
Post by: roentgen on 2006-06-01 22:22:18
when you guys say run coverart.exe from the commandline what do you mean?

I extracted it into a folder but how do i run the .exe from the "commandline"?


start /run / write 'cmd' then enter something like "C:\Program Files\fb2k\coverart\coverart.exe" "your artist" "your album" "path where to save the cover art"

but there's a simpler way... using foo_run
add a new entry with this command line
Code: [Select]
"C:\Program Files\fb2k\coverart\coverart.exe" "%artist%" "%album%" "E:\%artist%.%album%.folder.jpg"

(modify the paths with those on your system)
Title: CoverDownloader
Post by: bsommer on 2006-06-02 01:51:35
"alert, error writing file"

thats the error message i get when i click on the cover image to save it to the folder designated
Title: CoverDownloader
Post by: topdownjimmy on 2006-06-02 02:03:06
"alert, error writing file"

thats the error message i get when i click on the cover image to save it to the folder designated

make sure there are no characters in the intended filename that can't actually be in a filename (for example, forward slashes or question marks in an album title)
Title: CoverDownloader
Post by: pepito on 2006-06-02 03:59:38
thank you!
working fine with foo_run
there is also an albumart.exe ,took on the forum http://www.hydrogenaudio.org/forums/index....howtopic=40054# (http://www.hydrogenaudio.org/forums/index.php?showtopic=40054#)
Title: CoverDownloader
Post by: david_dl on 2006-06-02 05:46:09
I should have mentioned that it is possible to right click on a thumbnail to use "Save As..." if you wish to save it elsewhere.

Also, if anyone has suggestions for sites with covers that I haven't written scripts for yet, please suggest them here.
Note while it is possible to access the art on allmusic.com, they strictly forbid this, and shut down another software programme that did this. And they only have 200x200 covers.
Title: CoverDownloader
Post by: Chaser on 2006-06-02 08:36:45
I just had the problem mit blank albumart again. The horizontal lines come out of a "repainting"-problem.
One more thing: Let the program remember it's windowsize!


Quote
"alert, error writing file"

I get this, if I don't wait long enough (all albumart is loaded) and click on one too quickly... This could be optimized?!
Perhaps a small progressbar, where you see, how far the program has gotten?
Title: CoverDownloader
Post by: david_dl on 2006-06-02 11:24:44
Hmmm, the GUI definately needs some work. The trouble is, python is way more fun than C++ 
Well I'm not really in a state to work on it now, and it's queen's birthday weekend. I might have some time sunday morning, i'll see how it goes.
Title: CoverDownloader
Post by: Chaser on 2006-06-02 13:17:34
Thank you for looking into it!
Title: CoverDownloader
Post by: Chaser on 2006-06-02 15:10:21
Hi david,

"Excrementory Grindfuckers" - "Fertig machen, Szeneputzen", there is a cover found on rate your music. However it doesn't stop [searching]. Thus I can't save it...
(I have all of the three scripts in my folder..)
Title: CoverDownloader
Post by: Tich on 2006-06-02 16:03:04
Does that result show an image in the thumbnail? Are you using the latest version of the Amazon script (It's at the very bottom of the first post.) If the problem persists i'll have another fiddle with the script when I get home tonight (It uses the Web Services API and the URLs it gives me are, for some reason, not very reliable


The result does show an image in the thumbnail, yes.
I'm also using the latest version of the amazon script, but it seems like the picture isn't saved correctly.

Thanks for your effort

Tich
Title: CoverDownloader
Post by: david_dl on 2006-06-03 11:01:35
Hi. Sorry, I haven't worked on the problems with the Amazon script or the coverart GUI yet, but I do have an updated version of walmart (Just noticed an error in the original that means it would miss many covers), and a script for Buy.com, which has awesome 500x500px covers.

Both are attached to the first post. This means that none of the scripts in the original download archive are now up to date.

Buy.com script:

Code: [Select]
import urllib
import re

def GetThumbs(artist,album):
        out = []
        query = artist+" "+album
        params = urllib.urlencode({'qu': query.encode('utf8')}) + "&search_store=6&querytype=music&loc=109&dclksa=1"
        f = urllib.urlopen("http://www.buy.com/retail/searchresults.asp?" + params)
        r = re.compile("<img[^>]*src=\"http://ak.buy.com/db_assets/ad_images/([0-9]+)/([0-9]+).gif\">.*?<a[^>]*class=\"medBlueText\"><b>([^>]*)</b>",re.MULTILINE)
        r2 = re.compile("java script:largeIM\\(\'http://ak.buy.com/db_assets/large_images/([0-9]+)/([0-9]+).jpg\'\\)[^>]+><img[^>]*src=\"http://ak.buy.com/db_assets/prod_images/\\1/\\2.jpg\"[^>]*alt=\"([^\">]+)\"",re.MULTILINE)
        text = f.read()
        result = re.search(r2,text)
        if result!=None:
            return [[result.group(3),u"500x500","http://ak.buy.com/db_assets/prod_images/"+result.group(1)+"/"+result.group(2)+".jpg",[result.group(1),result.group(2)]]]
        iterator = r.finditer(text)
        for match in iterator:
            out.append([match.group(3),u"500x500","http://ak.buy.com/db_assets/prod_images/"+match.group(1)+"/"+match.group(2)+".jpg",[match.group(1),match.group(2)]])
        return out
def GetCover(param):
    return "http://ak.buy.com/db_assets/large_images/"+param[0]+"/"+param[1]+".jpg"
Title: CoverDownloader
Post by: Chaser on 2006-06-03 23:30:17
Thank you! Will try this out, when I'm back in my "studying-city"!

edit:
It seems that the coverdownloader has problems saving to the folder.jpg, if there's already one present in the target-directory! I get a messagebox...
Title: CoverDownloader
Post by: topdownjimmy on 2006-06-04 01:14:07
hmm, came across a failed search...artist "asobi seksu," album "citrus" didn't retrieve the image from rateyourmusic (though the album and art exist on the site)
Title: CoverDownloader
Post by: parive3 on 2006-06-04 02:43:35
The commandline syntax is quite simple, just coverart.exe <Artist> <Album> <File to save to>
The second two parameters are optional, if a path is not specified it will prompt you with a Save As dialog.


Is it possible to have a syntax :
coverart.exe <SearchName>  <File to save to>

Because sometimes I just want to search for the album because it might be a Various Artists one. And I would like to save the cover with filename syntax I provide.

If this is impossible because the way optional parameters are structured can you have it so if you put #Ignore# in the second parameter it will function like I mentioned above?
coverart.exe <SearchName> #Ignore# <File to save to>

Also the remembering Window size will be great.

Thanks
Title: CoverDownloader
Post by: Tich on 2006-06-04 11:50:10
if you want to search for an album only just use this command:
Code: [Select]
coverart.exe "" "%album%" "$replace(%_path%,%_filename_ext%,)front.jpg"


this will search for the album, ignoring the artist tag, and save the result to the same folder your music files are in.

Tich
Title: CoverDownloader
Post by: parive3 on 2006-06-05 10:46:13
Thanks
Title: CoverDownloader
Post by: yatahaze on 2006-06-09 03:36:55
This is a great tool, I have so much use for it.

The only issues I can find with it are:
- The amazon script pops up an error when there are no results, but there are real results from the other scripts.
- The thumbnails window is too small, I only can see 2 columns worth of covers, 5 would be nice.. or if it remembered.
- Would be nice to have the dos prompt window minimized.
- The cover downloader should close after it's finished downloading.

Hope to see some updates... Good work
Title: CoverDownloader
Post by: david_dl on 2006-06-09 06:00:37
This is a great tool, I have so much use for it.

The only issues I can find with it are:
- The amazon script pops up an error when there are no results, but there are real results from the other scripts.
- The thumbnails window is too small, I only can see 2 columns worth of covers, 5 would be nice.. or if it remembered.
- Would be nice to have the dos prompt window minimized.
- The cover downloader should close after it's finished downloading.

Hope to see some updates... Good work


Hi. I have a complete rewrite under way, it has a few issues that need sorting out, but it should be out today or tomorrow. Along with all the features listed above it has a 'preview' feature where you can see a particular cover in full before choosing to save it.

However it uses .NET 2.0, and although it is still slightly slower than the old version, .NET 2 really is nothing like .NET 1 in terms of speed, once the framework has been loaded (the first time you run it) its not noticeably slower than native code.
Title: CoverDownloader
Post by: david_dl on 2006-06-09 10:00:19
New version uploaded, see first post.

Sorry, I accidently deleted the old version 1 scripts from that post, but I still have them on my harddrive, and i'll upload v2 versions tomorrow.
Title: CoverDownloader
Post by: krazy on 2006-06-09 11:55:30
Oh man! David, this rocks!! Thankyou!
Title: CoverDownloader
Post by: Chaser on 2006-06-09 12:56:28
David, thank you for your ongoing development!

edit:
a small remark:
What do you think of putting the existing coverart on top of all found covers?

edit2:
# Buy.com and Rateyourmusic report "0x0" inside the tooltip. Is this because of not beeing able to determine the size of the coverat?
# Click on a coverart to save it. Then press the same coverart again, while it's beeing saved. Error pops up. I don't post a screenshot now, since it's reproducable for me
# Are you intending on adding a checkbox "Close after retrieving coverart" (or alternativly offer a commandlineswitch)

edit3:
# changing "Thumbnailsize" takes affect after a restart. The borders are redrawn in the new size. However the coverart isn't refreshed and resized!

edit4:
# Errordescription inside the attached image
[a href="http://img45.imageshack.us/my.php?image=aufnahme11bs.png" target="_blank"]
Title: CoverDownloader
Post by: david_dl on 2006-06-10 03:43:39
David, thank you for your ongoing development!

edit:
a small remark:
What do you think of putting the existing coverart on top of all found covers?


How do you mean, like a side-by-side comparison?

edit2:
# Buy.com and Rateyourmusic report "0x0" inside the tooltip. Is this because of not beeing able to determine the size of the coverat?

Yes. There is no reliable way to know the size of their covers without downloading the full-size image
# Click on a coverart to save it. Then press the same coverart again, while it's beeing saved. Error pops up. I don't post a screenshot now, since it's reproducable for me

Hmm, I've got to think about what to do about that. I think the Error message is quite self-explanatory to most people, but maybe there could be a prompt whether to cancel downloading and begin downloading the newly selected art
# Are you intending on adding a checkbox "Close after retrieving coverart" (or alternativly offer a commandlineswitch)

Done. Sorry, this slipped my mind last time/

edit3:
# changing "Thumbnailsize" takes affect after a restart. The borders are redrawn in the new size. However the coverart isn't refreshed and resized!

Fixed also
edit4:
# Errordescription inside the attached image
[a href="http://img45.imageshack.us/my.php?image=aufnahme11bs.png" target="_blank"]


Hmm, the Buy.com script is not the best, it can sometimes return many unrelated results and sometimes gives 404 Not Found errors. I might have a look at it when I have some time, but don't forget the scripts are quite easy to edit, so if you think you know what you're doing have a fiddle. The language used is IronPython and you have access to the whole of the .NET Framework, using the 'import' command.

Please download the new version of the application, I've updated the first post.
Title: CoverDownloader
Post by: parive3 on 2006-06-10 10:11:51
Nice Update

But is it possible to implement these features:
You had the dimension of the images in you earlier version can you please put this back.

Since the loading time of it is slow, can you make it use the existing instance of Coverart if its already opened. Than creating another instance of the application.
Title: CoverDownloader
Post by: Chaser on 2006-06-10 11:52:17
Quote
How do you mean, like a side-by-side comparison?

No. I meant, that right now first the different results of the different scripts are shown. (always devided by ________). After that the existing cover is displayed. I just propose to turn this around, so that the existing cover is shown in first place, if it exists. The way I propose, the user can easily see, if he already has an existing cover (and on addition which quality it has (i.e. middleclick).
Was I clearer now?

Quote
I think the Error message is quite self-explanatory to most people, but maybe there could be a prompt whether to cancel downloading and begin downloading the newly selected art

Well. I guess I would do the two following things:
a) If it's the same cover: Do nothing and continue downloading
b) It it's a different cover: Stop old coverdownload and start new download without any message poping up. (You might use the logbox on the bottom of the screen)


I will test your new version later today! Thank you for the quick fixes!


edit:
It looks really good, the way it is now! And concerning my first quote in this post: You have already changed this?! Haven't you?
Title: CoverDownloader
Post by: Neural_Overload on 2006-06-15 03:39:46
What version is the screenshot in the first post?
Title: CoverDownloader
Post by: Chaser on 2006-06-15 16:46:02
It is the new betaversion. It works smoothly for me!
Title: CoverDownloader
Post by: drake on 2006-06-18 02:34:14
how do i set permissions on the \folder.jpg original image to let me overwrite it when using this program?

right now i'm getting "System.UnauthorizedAccessException: Access to the path [...] is denied. At System.IO.__Error.WinIOError" etc. (if you need more details, i can post the full message)
Title: CoverDownloader
Post by: david_dl on 2006-06-18 06:42:28
I think that is caused by .NET's garbage collection not closing the handle for the preview for a while, I'll investigate it some time (maybe next weekend, this one has been rather, uh, rough)
Title: CoverDownloader
Post by: Neural_Overload on 2006-06-18 10:15:47
It is the new betaversion. It works smoothly for me!

Is the beta listed on the first page? If not, where can i get it?
Title: CoverDownloader
Post by: Chaser on 2006-06-18 10:52:21
Yes it is linked in the first post ("Experimental").
Here is the link to the attached file: http://www.hydrogenaudio.org/forums/index....pe=post&id=2280 (http://www.hydrogenaudio.org/forums/index.php?act=Attach&type=post&id=2280)
Title: CoverDownloader
Post by: Bachi-Bouzouk on 2006-06-18 17:53:37
Really great component, It works well for me except the error pop up when two double click at the same time (already descripted by Chaser)

I used AlbumArtAggregator, I think I will use only your component now

(By the way, it is quite slow to open, I don't know if you can change this)

edit
I have added a part about your program in my manual:
http://eolindel.free.fr/foobar0.9/albumart.shtml (http://eolindel.free.fr/foobar0.9/albumart.shtml)
Title: CoverDownloader
Post by: david_dl on 2006-06-19 06:56:36
I used AlbumArtAggregator, I think I will use only your component now

(By the way, it is quite slow to open, I don't know if you can change this)


Hmm yea, this is the aim of the next version. It will feature a 'queue', where multiple searches can be handled by the same instance, and further search requests from foobar will be added to the queue.
Title: CoverDownloader
Post by: yatahaze on 2006-06-19 07:03:22
I really like the new version. A couple requests:

- Load time is a bit slow, can it get faster? Or maybe I'm being too picky...
- The spacing between thumbnails is way too wide. Can hardly fit that many albums on my screen even though its huge.
- The buy.com script always returns about 10 to 15 results that have nothing to do with what I searched for, and they're the same ones on every search I do for any album. I think they are all from a "top albums" section or something. They just look like popular albums. It would be nice if that was fixed as well, because it kind of gets in the way, especially when buy.com shows up first on the list.

Otherwise, this is a big improvement, keep up the good work.. I use this all the time
Title: CoverDownloader
Post by: david_dl on 2006-06-19 07:19:02
I really like the new version. A couple requests:

- Load time is a bit slow, can it get faster? Or maybe I'm being too picky...

Problem noted, see my post above
Quote
- The spacing between thumbnails is way too wide. Can hardly fit that many albums on my screen even though its huge.

It's much more compact on windows 2000 (no grouping).
I'll add an option to turn this on/off and to reduce whitespace between thumbs.
Quote
- The buy.com script always returns about 10 to 15 results that have nothing to do with what I searched for, and they're the same ones on every search I do for any album. I think they are all from a "top albums" section or something. They just look like popular albums. It would be nice if that was fixed as well, because it kind of gets in the way, especially when buy.com shows up first on the list.

Problem noted. I'll do some more digging through the buy.com HTML source. BTW the order of the groups is based on the script filenames, I've renamed my buy.com script to www.buy.com.py so it's at the end.


Edit: screwed up the quotes
Title: CoverDownloader
Post by: yatahaze on 2006-06-19 07:44:45
So will it be possible to keep the gaps minimal but still keep the grouping of scripts?

Also, is it possible to include the artist name underneath the album name for the results? It would be easier to pick out the results that are wrong that way. When I think about it, if that were possible, why would it even show an album by an artist other than what I searched for?
Title: CoverDownloader
Post by: KarnEvil9 on 2006-06-19 16:58:06
Great program!  This has really made accumulating album art much easier.  Thanks. 

I do have a couple suggestions, though:

1.  When you tab from Artist to Album, could you highlight the present text in the Album field, so you can easily overwrite it?

2.  When selecting a path, it would be nice if folder.jpg (or perhaps last used filename) was the default, so you don't have to type it in each time.

Oh yeah, one more thing, how about an icon? 

Thanks again!
Title: CoverDownloader
Post by: Bachi-Bouzouk on 2006-06-19 18:44:55
Minor request: be able to get the URL adress of the picture to be able to show covers easily on forums (right click or option)
Title: CoverDownloader
Post by: david_dl on 2006-06-20 06:41:40
So will it be possible to keep the gaps minimal but still keep the grouping of scripts?

Also, is it possible to include the artist name underneath the album name for the results? It would be easier to pick out the results that are wrong that way. When I think about it, if that were possible, why would it even show an album by an artist other than what I searched for?


I'll play around with some layouts for the next version.

Great program!  This has really made accumulating album art much easier.  Thanks. 

I do have a couple suggestions, though:

1.  When you tab from Artist to Album, could you highlight the present text in the Album field, so you can easily overwrite it?

2.  When selecting a path, it would be nice if folder.jpg (or perhaps last used filename) was the default, so you don't have to type it in each time.

Oh yeah, one more thing, how about an icon? 

Thanks again!


I'll keep these requests in mind too 

Minor request: be able to get the URL adress of the picture to be able to show covers easily on forums (right click or option)


Sure, that's a good idea.

Attached is an updated version of Buy.py which shouldn't return those vague results.

Grr, server won't accept .py. I've zipped it.
Title: CoverDownloader
Post by: Neural_Overload on 2006-06-20 08:31:43
I love the cover art downloader but I have one request: The ability to view two different covers side by side so you can compare them and hopefully pick the better of the two.

Edit: I have another request: Have the dimensions of the art listed below the thumbnail.

Edit2: It appears that the new buy.com script gives this error on every search.
(http://img150.imageshack.us/img150/3239/error1bc.th.png) (http://img150.imageshack.us/my.php?image=error1bc.png)
Title: CoverDownloader
Post by: yatahaze on 2006-06-21 07:52:55
Is it possible for the text or something to be highlighted on the album if it matches the exact album name that I searched for?
Title: CoverDownloader
Post by: Stuart60611 on 2006-06-22 17:43:25
I have downloaded the new experimental version(s), both b and c.  However, unlike the regular version, the resulting download is not a coverart folder with properly origanized subfolders, but it is instead just a series of files (less files than the non-experimental version).  When I try to run albumart.exe I get errors because the file expects certain other files in varying subfolders.  As such, how am I supposed to organize the files of the experimental version(s) to work.  Also, the first post indicates that there are updated source scripts attached to the post for wallmart, amazon, etc., but they are not listed.  Likewise, the experimental version says it only works with two  source scripts, but the experimental version(s) come with all the source scripts.

Basicly, can someone explain what to do once one downloads either experimental version so that it works and all of the most recent source scripts are used.  Thanks.
Title: CoverDownloader
Post by: david_dl on 2006-06-25 06:09:12
Basicly, can someone explain what to do once one downloads either experimental version so that it works and all of the most recent source scripts are used.  Thanks.


Try the latest version.

This version features the 'queue' system I had planned to implement earlier, any new searches you initiate from the commandline will be queued in the existing instance of the program.
Title: CoverDownloader
Post by: Gow on 2006-06-25 17:51:55
A good cover art site I have discovered in my travels is http://www.cover-paradies.to/ (http://www.cover-paradies.to/)
Cover Paradies.

Cover art is high quality, from 1024 and up.  Sometimes below.
Title: CoverDownloader
Post by: rouge on 2006-06-25 18:36:06
Has anyone else noticed the whitespace border that has been added to any cover art on Amazon.com?
Title: CoverDownloader
Post by: KarnEvil9 on 2006-06-26 01:46:46
Thanks for adding my suggestions!   

Not to sound greedy, but I have a few other things for you to consider:

Something in the status bar to indicate it's done searching.  I know sometimes it says Complete, but it continues downloading more thumbnails.

Google Image support, though you'd probably want to limit it to the first 10 matches or something.

Alpha-sorting within groups.

Session cache.  If you view and then download, it has to download twice.  Also, often times it grabs the same thumbnail for multiple searches.

Thanks again! 
Title: CoverDownloader
Post by: bsommer on 2006-07-01 17:17:53
does anyone know why it works fine retrieving the cover art but then a error message comes up saying
"unable to connect to the remote server"
Title: CoverDownloader
Post by: david_dl on 2006-07-02 08:25:56
New version out. This time the scripts are in a new language, 'Boo', which is very python-like, and are only compiled when they changed, so startup times should be way faster.
The folks at rateyourmusic seem to have gone to lengths to block automated scripts, so the rateyourmusic script is disabled for now.

Edit: download here (http://www.hydrogenaudio.org/forums/index.php?act=Attach&type=post&id=2318)
Title: CoverDownloader
Post by: roentgen on 2006-07-02 08:54:55
New version out. This time the scripts are in a new language, 'Boo', which is very python-like, and are only compiled when they changed, so startup times should be way faster.

Great piece of work.
The speed prevented me for using it before but now it's fine
I really miss displaying the size of cover if that could get implemented somehow and also pressing ESC to close the preview window would be nice
Title: CoverDownloader
Post by: NEMO7538 on 2006-07-02 09:26:42
Why does it connect to akamai.net?
Title: CoverDownloader
Post by: david_dl on 2006-07-02 09:40:30
Great piece of work.
The speed prevented me for using it before but now it's fine
I really miss displaying the size of cover if that could get implemented somehow and also pressing ESC to close the preview window would be nice


Escape feature added for next version. I'll look into the sizes thing, the problem is that its impossible to know the size without downloading the full art (the old version guessed).

Why does it connect to akamai.net?


One of the sites it downloads covers from is probably using akamai for bandwidth/hosting. Akamai run a network of servers around the world and they use DNS etc to invisbly redirect you to the closest server. For example when I visit microsoft.com the images come from an akamai cache in Auckland.
Title: CoverDownloader
Post by: carmenm on 2006-07-02 23:21:29
Hi, first a huge thanks to u david_dl, the last version works just great and is a lot faster. Yet i have a little request which might not got birth but i think it is worth asking.
I am using rockbox on my jukebox and it can display album arts but they have to be 75x75 and be named cover.bmp. It could make my life and i am sure the life of a lot of other people if there could be an option in coverdown to save as you save a cover another file named cover.bmp which would be 75x75 in the same directory.
Do you think it is possible?
Title: CoverDownloader
Post by: audioaficionado on 2006-07-04 03:33:32
Works great! Thank you

It's quick and simple unlike some of the competition.

A whole lot easier than googling for album art covers 
Title: CoverDownloader
Post by: roentgen on 2006-07-04 05:00:46
I am using rockbox on my jukebox and it can display album arts but they have to be 75x75 and be named cover.bmp. It could make my life and i am sure the life of a lot of other people if there could be an option in coverdown to save as you save a cover another file named cover.bmp which would be 75x75 in the same directory.
Do you think it is possible?

Irfanview may do this with no hassle. Just press B and look in 'Advanced otions'
Title: CoverDownloader
Post by: audioaficionado on 2006-07-04 05:57:25
IrFanView/Image/Resize-Resample image/preserve aspect ratio.

Just key in 75 (pixels) in one box and the other will also reduce the same.  Then save it as a .bmp.

I use this to make avatars and icons all the time.
Title: CoverDownloader
Post by: david_dl on 2006-07-04 06:07:48
Irfanview may do this with no hassle. Just press B and look in 'Advanced otions'


But it would be less hassle if CoverDownloader did it. I will add options for saving in other formats. Also I'm thinking about the best way to handle inlay/cd/rear covers, such as those found on the excellent site someone posted somewhere in this thread (it's in german but is still usable).
Title: CoverDownloader
Post by: carmenm on 2006-07-04 08:53:30
It is not a question of how to do it because i have a soft a lot easier to use than irfanview. I just have to drag the folder.jpg in it and i have a cover.bmp 75x75.
AS said david_dl it would so much easy and quick to do it with coverdownloader.

Thanks a lot david_dl for thinking about it 
Title: CoverDownloader
Post by: audioaficionado on 2006-07-04 08:54:54

Irfanview may do this with no hassle. Just press B and look in 'Advanced otions'


But it would be less hassle if CoverDownloader did it. I will add options for saving in other formats. Also I'm thinking about the best way to handle inlay/cd/rear covers, such as those found on the excellent site someone posted somewhere in this thread (it's in german but is still usable).
Any new cover art sites would be welcome.  Especially the ones that have large jpg images like WalMart does.

One niggle.  Is there a way to shut off that 'Server returned an error' GUI?  I'd just as soon not have to click it out of the way every time one of the sites is down.  Let it just fail in silence while the rest of them download their images.

This program is fantastic and really helps speed up my album art acquisition.  I still have to occasionally Google for out of print albums but what the heck.  By the time EAC is done ripping, I already have the folder.jpg in place and the next one ready to drop in the next rip folder.
Title: CoverDownloader
Post by: KarnEvil9 on 2006-07-04 17:08:33
Would it be possible to indicate in the status bar when the scripts have all finished?

Thanks. 
Title: CoverDownloader
Post by: david_dl on 2006-07-07 05:05:20
Hi again. Buy.com seems to be broken, i'll investigate it some time.
Anyway here's a script for CoverParadies. These covers are simply awesome (and caching is badly needed because of their size, so i'll implement that for the next version).

Just save it as a .boo file in your scripts folder.

Edit: The forum screws up the script so I've had to attach it.
Title: CoverDownloader
Post by: KarnEvil9 on 2006-07-07 05:23:38
Thanks for the new script!

Have you heard of Albumart.org (http://albumart.org/)?
Title: CoverDownloader
Post by: david_dl on 2006-07-07 05:26:50
Thanks for the new script!

Have you heard of Albumart.org (http://albumart.org/)?


As far as I can see albumart.org is just using the Amazon results which Amazon.boo already fetches. Please correct me if I am wrong here.
Title: CoverDownloader
Post by: roadtonowhere08 on 2006-07-11 04:00:44
Hi,

I have this plugin hooked up to foobar using foo_run but everytime I search for CD art the artist and album is question marks and I keep getting the same 9 assorted album covers. I can search manually, but I read that using foo_run was much faster. Any help would be greatly appreciated.
Title: CoverDownloader
Post by: KarnEvil9 on 2006-07-11 04:56:36
Have you heard of Albumart.org (http://albumart.org/)?

As far as I can see albumart.org is just using the Amazon results which Amazon.boo already fetches. Please correct me if I am wrong here.

Could be.  I just saw some nice covers on there, but didn't note their source.
Title: CoverDownloader
Post by: Tich on 2006-07-11 06:56:36
Hi,

I have this plugin hooked up to foobar using foo_run but everytime I search for CD art the artist and album is question marks and I keep getting the same 9 assorted album covers. I can search manually, but I read that using foo_run was much faster. Any help would be greatly appreciated.


This is the commandline I use for foo_run, works just fine for me 
Quote
C:\<YOUR PATH TO ALBUMART.EXE>\albumart.exe "%artist%" "%album%" "$replace(%_path%,%_filename_ext%,)%artist% - %album% - Front.jpg"


The only thing you have to do is insert your path to albumart.exe (can be done via de browse button) and edit the filename (marked in red) to your liking. The result will then be saved in the same folder as the song you started foo_run from. 

I hope this helps, Tich
Title: CoverDownloader
Post by: roadtonowhere08 on 2006-07-11 07:06:50
Hi,

I have this plugin hooked up to foobar using foo_run but everytime I search for CD art the artist and album is question marks and I keep getting the same 9 assorted album covers. I can search manually, but I read that using foo_run was much faster. Any help would be greatly appreciated.


This is the commandline I use for foo_run, works just fine for me 
Quote
C:\<YOUR PATH TO ALBUMART.EXE>\albumart.exe "%artist%" "%album%" "$replace(%_path%,%_filename_ext%,)%artist% - %album% - Front.jpg"


The only thing you have to do is insert your path to albumart.exe (can be done via de browse button) and edit the filename (marked in red) to your liking. The result will then be saved in the same folder as the song you started foo_run from. 

I hope this helps, Tich


It turns out that I tagged all my .wavs wrong as there is no metadata apparently. I can read some .mp3s that I got online, but my .wavs have just titles and nothing else. COuld you point me in the right direction to ripping CDs with tags that would allow me to use this plugin? God, I am a noob...
Title: CoverDownloader
Post by: david_dl on 2006-07-11 07:25:58
[quote name='Tich' post='410641'
It turns out that I tagged all my .wavs wrong as there is no metadata apparently. I can read some .mp3s that I got online, but my .wavs have just titles and nothing else. COuld you point me in the right direction to ripping CDs with tags that would allow me to use this plugin? God, I am a noob...


WAV files cannot be tagged. If you want to retain the lossless quality, I would recommend using a lossless format that supports tags, for example FLAC or WavPack.
Title: CoverDownloader
Post by: altered.ego on 2006-07-11 14:21:01
Don't change anything anymore. It's perfect!

Thanks, David!

Title: CoverDownloader
Post by: david_dl on 2006-07-11 23:55:16
Don't change anything anymore. It's perfect!

Thanks, David!



Well I had been working on communication with foobar using foo_comserver, as well as some image conversion and resizing features. I've also added caching. But I don't know when I'll be ready to release this version.
Also errors no longer pop up annoyingly (btw. It seems that coverparadies is down.)

(http://img109.imageshack.us/img109/4407/coverartdownloader12july200610.png)
Title: CoverDownloader
Post by: Moonwhaler on 2006-07-13 11:25:13
This is unbelievable! Your tool is heaven. The new features look like something big is coming, but the thing I miss the most is the possibility to display the image size in the preview window. Is this possible somehow?

I'll count the days  till the next version arrives!
Title: CoverDownloader
Post by: Bachi-Bouzouk on 2006-07-15 19:37:43
I don't know if you already implemented this feature or if it is a request, but massdowloading would be nice, for the moment, I have to select a file per album, right click and again and again, it is quite annoying when you have 100 albums while if I could select a lot of fles in foobar and then run coverdownloader, it would be really nice. I don't know if I should post this request here or in th foo_run topic. (Sorry for the poor explanation)

Another request: Add the EXISTINg pictures when we have dowloaded the cover because when you have a lot of album, saving the cover is not always done immediatly when you double click on the file and I had to double click several times.. to save several times the cover and get pop up errors because I tried to save the cover two times at once.

Anyway, the 0.3 version is already great!!

By the way, I wrote a help page here to  explain how the Cover downloader works:
http://eolindel.free.fr/foobar0.9/albumart.shtml (http://eolindel.free.fr/foobar0.9/albumart.shtml)
Title: CoverDownloader
Post by: david_dl on 2006-07-16 03:15:54
I don't know if you already implemented this feature or if it is a request, but massdowloading would be nice, for the moment, I have to select a file per album, right click and again and again, it is quite annoying when you have 100 albums while if I could select a lot of fles in foobar and then run coverdownloader, it would be really nice. I don't know if I should post this request here or in th foo_run topic. (Sorry for the poor explanation)

If you turn on the 'Close after downloading art' option, clicking on the art to save it will cause the program to automatically switch to the next item in the queue. However it's a little buggy in the current release, I've improved the way it works in the new version. I could add automatic downloading if that would be helpful to you, but personally I like to look at a few covers first because there are nearly always several versions of each cover (different releases, imports, ones with and without 'parental guidance' stickers)

Another request: Add the EXISTINg pictures when we have dowloaded the cover because when you have a lot of album, saving the cover is not always done immediatly when you double click on the file and I had to double click several times.. to save several times the cover and get pop up errors because I tried to save the cover two times at once.

This is also fixed (and a lot faster) in the new (not yet released) version.

By the way, I wrote a help page here to  explain how the Cover downloader works:
http://eolindel.free.fr/foobar0.9/albumart.shtml (http://eolindel.free.fr/foobar0.9/albumart.shtml)

I had a look, your page looks very comprehensive and will definately be very helpful for new users of foo_uie_albumart.
Title: CoverDownloader
Post by: Bachi-Bouzouk on 2006-07-16 13:09:20
If you turn on the 'Close after downloading art' option, clicking on the art to save it will cause the program to automatically switch to the next item in the queue. However it's a little buggy in the current release, I've improved the way it works in the new version. I could add automatic downloading if that would be helpful to you, but personally I like to look at a few covers first because there are nearly always several versions of each cover (different releases, imports, ones with and without 'parental guidance' stickers)
I didn't explain correctly my point of vue.

For the moment, I didn't manage to queue several files for the cover downloader by selecting them and using the contextual menu only once.

I would like to queue several files in one click. Did I miss an option?
Title: CoverDownloader
Post by: david_dl on 2006-07-17 03:11:50
didn't explain correctly my point of vue.

For the moment, I didn't manage to queue several files for the cover downloader by selecting them and using the contextual menu only once.

I would like to queue several files in one click. Did I miss an option?


Sorry for the misunderstanding. Setting 'Simultaneous Runs' to unlimited in foo_run should yield the behaviour you desire.
Title: CoverDownloader
Post by: lordgibbness on 2006-07-18 15:00:37

i'd also like to suggest http://www.rateyourmusic.com/ (http://www.rateyourmusic.com/) for finding album art, it's far and away the most comprehensive collection of album art i've found, i find everything except super, super rare stuff on there.  fantastic resource.


Here's a script for that. Save as "Rate Your Music.py" in coversources\scripts:
Code: [Select]
[..]


Hi,
After creating this script in the scripts directory and removing the ".disabled" from the rateyourmusic.boo.disabled file whenever I run this program I get an Error 403 Forbidden message. Is this occuring for anyone else?
Title: CoverDownloader
Post by: Tich on 2006-07-18 18:28:45
[
Hi,
After creating this script in the scripts directory and removing the ".disabled" from the rateyourmusic.boo.disabled file whenever I run this program I get an Error 403 Forbidden message. Is this occuring for anyone else?


cover-paradies changed their site about a week ago and the script stopped working. same error pops up here

otherwise fantastic work david_dl, looking forward to the next version

Tich
Title: CoverDownloader
Post by: lordgibbness on 2006-07-18 18:40:03
www.cover-paradies.to is not the same as www.rateyourmusic.com though, is it?
Title: CoverDownloader
Post by: Anas on 2006-07-18 18:43:04
After creating this script in the scripts directory and removing the ".disabled" from the rateyourmusic.boo.disabled file whenever I run this program I get an Error 403 Forbidden message. Is this occuring for anyone else?
Guess why it's disabled.
Title: CoverDownloader
Post by: lordgibbness on 2006-07-18 18:56:05
New version out. This time the scripts are in a new language, 'Boo', which is very python-like, and are only compiled when they changed, so startup times should be way faster.
The folks at rateyourmusic seem to have gone to lengths to block automated scripts, so the rateyourmusic script is disabled for now.

Edit: download here (http://www.hydrogenaudio.org/forums/index.php?act=Attach&type=post&id=2318)

Yeah, just saw this.
Title: CoverDownloader
Post by: Chaser on 2006-07-19 18:13:30
http://www.cover-paradies.to/ (http://www.cover-paradies.to/) is back online. The changed their layout. I haven't tested, whether the old script is still working!
Title: CoverDownloader
Post by: Rhand on 2006-07-19 22:11:32
Is this working on Windows 64bit, I get an error that AlbumArt failed to initialize properly (0xc0000135) click on OK to terminate the application.?

It would be nice to have this working.

Sorry ve4ry stupid of me.  Forgot to install net2.0
Title: CoverDownloader
Post by: Anas on 2006-07-20 10:08:37
http://www.cover-paradies.to/ (http://www.cover-paradies.to/) is back online. The changed their layout. I haven't tested, whether the old script is still working!

It hasn't been offline for long. I think the problem is that they changed they search form posting method from get to post what makes the current script useless.
Title: CoverDownloader
Post by: Rhand on 2006-07-20 10:50:11
This site has large covers maybe you could add this? http://www.coveralia.com/ (http://www.coveralia.com/)
Title: CoverDownloader
Post by: popol on 2006-07-22 18:30:36
I have a little question

The way my setting is, I have one cover for one album.

And when a song on that album has a single release I have a cover for it too.

My sources are:

1. Artist-Album-Title (this for single covers)
2. Artist-Album

logically, it should display the single cover when it is available and NOT the album cover.

However, I have found that it doesn't display the single cover, even though I put it above the album cover in the sources order. It only does if I check the "cycle through sources thing", which I don't really like... I'd like to have only on pic shown.

Anyone can help me?
Title: CoverDownloader
Post by: drake on 2006-07-22 19:55:20
how do i update to the new boo-based one?
Title: CoverDownloader
Post by: audioaficionado on 2006-07-22 23:44:02
how do i update to the new boo-based one?
Either first delete the old version's folder and just unrar the whole 'coverdownloader' container folder into the program folder.  Your shortcut link will still work if you didn't change the folder name the first time you installed the earlier version.  You can also rename the old version's folder until you are sure you like the new version better.  I sure do

Excellent work David
Title: CoverDownloader
Post by: david_dl on 2006-07-23 01:27:03
Because I haven't worked on this for a while, and the version I'm using is a bit nicer to use, I'll upload it.
Please note this is experimental, the Browser function will only work if you have foo_comserver installed.

There is also a working script for coverparadies as well although it isn't very good, in fact i can't get the search to work as well as it used to even manually using my webbrowser. There are a few more search options but they involve long complicated-looking German words and I have no idea what they mean.
Title: CoverDownloader
Post by: Chaser on 2006-07-23 09:00:40
Concerning German, I volunteer helping you!
Title: CoverDownloader
Post by: Tich on 2006-07-23 12:09:53
Concerning German, I volunteer helping you!


count me in as well, just PM any german expressions and I'll do my best to translate them
Title: CoverDownloader
Post by: coys on 2006-07-29 20:59:13
Hey David, thanks for a superb tool, it's exactly what I've been looking for.

I've been trying out the latest version with the browser and it's great, except that in the browser the 'Album' and 'Artist' column headings are the wrong way round.  Also, it would be good if the browser would inherit the filenaming format passed in by foobar - currently if you select an album via the browser, it defaults to saving the album art in the same directory as the music files.

Anyway that's just me being cheeky, it's already excellent so thanks.
Title: CoverDownloader
Post by: booh on 2006-08-01 20:46:01
Hey david. awesome plugin! 

I do have one request, and I'm not sure - it may already be implemented:  What I'd like is that if I'm listening to an album that I don't have a cover yet, it will automatically run the search and download one for me.

I don't know how difficult that would be, but I'm guessing the best way to do this is when a song/album is added to a playlist...
Again, if this is already implemented then feel free to hit me with a cluebat and let me know how I can do this.

Thanks and keep up the *awesome* work,

booh.
Title: CoverDownloader
Post by: Yotsuya on 2006-08-01 23:25:21
Are there any tutorials or additional information on how to develop scripts for this component? Maybe a generic script with commonly used routines to pull information off pages?  I sat and tried to whip one up for Google Image but I got nowhere fast.  The only script this component comes with that seems to be at all useful is the amazon script, but amazon's selection is rather limited if your listening habits stray outside western mainstream media.

I did a bit of googling about boo and while it does resemble python most of what I found was simple "hello world" type of stuff and not helpful in parsing html/javascript for image links. And to be completely honest my interest in boo does not extend much past using it for this component.

I currently use TAGZ to spit out an url with foo_run to launch Google Images and the results are usually far better than anything the existing scripts for this component provide.
Title: CoverDownloader
Post by: david_dl on 2006-08-02 05:35:59
Are there any tutorials or additional information on how to develop scripts for this component? Maybe a generic script with commonly used routines to pull information off pages?  I sat and tried to whip one up for Google Image but I got nowhere fast.  The only script this component comes with that seems to be at all useful is the amazon script, but amazon's selection is rather limited if your listening habits stray outside western mainstream media.

I did a bit of googling about boo and while it does resemble python most of what I found was simple "hello world" type of stuff and not helpful in parsing html/javascript for image links. And to be completely honest my interest in boo does not extend much past using it for this component.

I currently use TAGZ to spit out an url with foo_run to launch Google Images and the results are usually far better than anything the existing scripts for this component provide.


I have never used boo for anything else, but I do use python, and the syntax is almost identical. However boo lacks the standard library of Python, instead you use the .NET framework, documentation for which can be found here. (http://msdn2.microsoft.com/en-us/library/ms306608.aspx)

I would recommend starting by looking at the Walmart script. I've added some code with comments here:
Code: [Select]
# refs: System.Web

This line adds a reference to System.Web (the # refs: thing is picked up by my own 'preprocessor' before boo compiles the script. Note that a reference to System.Web isn't necessary because util (imported below) already references it
Code: [Select]
namespace CoverSources

You must use the CoverSources namespace for the class that will perform the search. Do not place other classes in the CoverSources namespace (AFAIK Boo only supports one namespace per source file, so put helper classes in another file and import them [like I have done with 'util'])
Code: [Select]
import System.Text.RegularExpressions
import util

util is just some helper functions (GetPage, EncodeUrl). See util.boo for details.
Code: [Select]
class Walmart:

Time to define the class that will do the work. Note that this class is never instantiated so eveything has to be 'static'
Code: [Select]
    static SourceName as string:
        get: return "Walmart"
    static SourceVersion as decimal:
        get: return 0.2

The above two properties must be defined.

Now comes the function which fetches a list of thumbnails, It always takes these 3 parameters:
(Reference to a callback class,a (unicode) string containing the name of the artist,another (unicode) string with the name of the album)
Either of the two strings can be empty ("")
Code: [Select]
    static def GetThumbs(coverart,artist,album):
            query = artist+" "+album
            params = 'search_query=' + EncodeUrl(query)
            text = GetPage("http://www.walmart.com/catalog/search-ng.gsp?Continue.x=0&Continue.y=0&Continue=Find&ics=20&ico=0&search_constraint=4104&" + params)

Now we use some regular expressions (System.Text.RegularExpressions.Regex) to extract the info we need from the page we fetched using GetPage(). This is just one way of parsing the page, you could also search for certain bits of text using the String.* (http://msdn2.microsoft.com/en-us/library/system.string_members.aspx) functions.
Note there are two types of result page walmart can return, one is a list of results, the other is when it goes directly to the product page.
Code: [Select]
            r = Regex("<a\\shref=\"/catalog/product\\.do\\?product_id=[0-9]+\"><img\\ssrc=\"([^\"]+)60X60.gif\"[^>]+alt=\"([^\"]*)\"[^>]*>",RegexOptions.Multiline)
            r2 = Regex("""<a\shref="java script:photo_opener\('(http://i.walmart.com/[a-zA-Z0-9/]+_)500X500.jpg""",RegexOptions.Multiline)
            if r2.IsMatch(text):
                result = r2.Match(text)
                coverart.AddThumb(result.Groups[1].Value+"150X150.jpg","Product Page",500,500,result.Groups[1].Value)
                return
            iterator = r.Matches(text)
            coverart.SetCountEstimate(iterator.Count)
            for result as Match in iterator:
                coverart.AddThumb(result.Groups[1].Value+"150X150.jpg",result.Groups[2].Value,500,500,result.Groups[1].Value)

<callback object>.SetCountEstimate() is not necessary, but allows the GUI to display a progress like ('3/10' instead of just '3')
<callback object>.AddThumb() adds a thumbnail result. The parameters are as follows, in this order:The following procedure is called when the user selects a piece of art to download, or to preview. Note that it will only ever be called once for a particular piece of art, due to caching. There is only one argument, which is the data you passed as the last argument of AddThumb() (above).

As for the first argument of AddThumb, the return value for this function can be either a URL, a System.Stream, but this time NOT a System.Drawing.Image.
Code: [Select]
    static def GetResult(param):
            return param as string + "500X500.jpg"


I hope this helps you a bit. I think the forum will mess up the indenting, but if you look at the original script you should be able to work it out. You don't need to worry about error handling, the application will catch any exceptions thrown. If you want a good IDE with intellisense, you can install SharpDevelop. (http://sharpdevelop.net/OpenSource/SD/Default.aspx)
Your scripts can be debugged using Visual Studio or the standalone CLR debugger that comes with the free .NET SDK.

And if you do write a script, or you need help writing one, please post it here.

Thanks.
Title: CoverDownloader
Post by: rectangle on 2006-08-02 08:05:29
Hey david. awesome plugin! 

I do have one request, and I'm not sure - it may already be implemented:  What I'd like is that if I'm listening to an album that I don't have a cover yet, it will automatically run the search and download one for me.

I have something like this working for me at the moment using Samurize (http://www.samurize.com/) AMPI 'getAlbumCover'. I use
Code: [Select]
C:\Program Files\Samurize\covers\%artist% - %album%*
&
Code: [Select]
C:\Program Files\Samurize\covers\%artist% - %title%*
in Album Art Panel preferences to show the covers downloaded by Samurize.
Title: CoverDownloader
Post by: Yotsuya on 2006-08-02 19:27:30
Thank you david for that breakdown I think I'm almost there but could use a little help, I am obviously a noob at this boo language.  This is my script so far:
Code: [Select]
namespace CoverSources
import System.Text.RegularExpressions
import util
class GoogleImage:
static SourceName as string:
get: return "GoogleImage"
static SourceVersion as decimal:
get: return 0.2
static def GetThumbs(coverart,artist,album):
        query = artist+" "+album
        params = EncodeUrl(query)
        text = GetPage("http://images.google.com/images?q=" + params)
        r = Regex("dyn.img(\"[^>]\",\"[^>]\",\"[^>]\",\"[^>]\",\"[^>]\",\"[^>]\",\"[^>]\",\"[^>]\",\"[^>]\",\"[^>]\",\"[^>]\",\"[^>]\",\"[^>]\",\"[^>]\")",RegexOptions.Multiline)
        iterator = r.Matches(text)
        coverart.SetCountEstimate(iterator.Count)
        for result as Match in iterator:
            coverart.AddThumb("http://www.images.google.com/images?q=tbn:" + result.Groups[3].Value + result.Groups[4].Value,result.Groups[7].Value,0,0,result.Groups[4].Value)
static def GetResult(param):
        return "http://"+param
I think my problem is with the "r=Regex()" line.  The google image page contains a line toward the bottom wich contains (after some other code) groupings of 14 variables, each within quotes, each then separated by a comma, inside a function dyn.img(), and then each group is separated by a semicolon.  I think I've got most of the mechanics down except for the bit where it parses the page for these groupings.  I will continue to tinker around with it but any input you could provide would be welcome.

Also, how would I substitute all spaces in a string with a plus sign?
Title: CoverDownloader
Post by: david_dl on 2006-08-02 21:27:14
Thank you david for that breakdown I think I'm almost there but could use a little help, I am obviously a noob at this boo language.  This is my script so far:
Code: [Select]
namespace CoverSources
import System.Text.RegularExpressions
import util
class GoogleImage:
static SourceName as string:
get: return "GoogleImage"
static SourceVersion as decimal:
get: return 0.2
static def GetThumbs(coverart,artist,album):
        query = artist+" "+album
        params = EncodeUrl(query)
        text = GetPage("http://images.google.com/images?q=" + params)
        r = Regex("dyn.img(\"[^>]\",\"[^>]\",\"[^>]\",\"[^>]\",\"[^>]\",\"[^>]\",\"[^>]\",\"[^>]\",\"[^>]\",\"[^>]\",\"[^>]\",\"[^>]\",\"[^>]\",\"[^>]\")",RegexOptions.Multiline)
        iterator = r.Matches(text)
        coverart.SetCountEstimate(iterator.Count)
        for result as Match in iterator:
            coverart.AddThumb("http://www.images.google.com/images?q=tbn:" + result.Groups[3].Value + result.Groups[4].Value,result.Groups[7].Value,0,0,result.Groups[4].Value)
static def GetResult(param):
        return "http://"+param
I think my problem is with the "r=Regex()" line.  The google image page contains a line toward the bottom wich contains (after some other code) groupings of 14 variables, each within quotes, each then separated by a comma, inside a function dyn.img(), and then each group is separated by a semicolon.  I think I've got most of the mechanics down except for the bit where it parses the page for these groupings.  I will continue to tinker around with it but any input you could provide would be welcome.
Try this:
Code: [Select]
r=Regex("""dyn\.img\("([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)"\)""")
I haven't tested it in a script but I know the regular expression works. Note that using the triple quotes (""") avoids the need for escaping every quote sign and backslash.

Quote
Also, how would I substitute all spaces in a string with a plus sign?
This should do it:
Code: [Select]
query.Replace(' ','+')

Good luck, and I'm sure many would appreciate it if you share your script when you're finished.
Title: CoverDownloader
Post by: Yotsuya on 2006-08-02 21:47:20
Current code:
Code: [Select]
namespace CoverSources
import System.Text.RegularExpressions
import util
class GoogleImage:
static SourceName as string:
get: return "GoogleImage"
static SourceVersion as decimal:
get: return 0.2
static def GetThumbs(coverart,artist,album):
#         query = artist+" "+album
#         params = EncodeURL(query)
        params = "test"
        text = GetPage("http://images.google.com/images?q="+params)
        r = Regex("""dyn\.img\("([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)"\)""")
        iterator = r.Matches(text)
        coverart.SetCountEstimate(iterator.Count)
        for result as Match in iterator:
            coverart.AddThumb("http://www.images.google.com/images?q=tbn:"+result.Groups[3].Value+result.Groups[4].Value,result.Groups[7].Value,0,0,result.Groups[4].Valu
e)
static def GetResult(param):
        return "http://"+param

Well it's still indicating 0/0 images. I commented out the artist & album and set params to a known-good static string to rule out improper processing of the album & artist.  If I view the source of the page http://images.google.com/images?q=test (http://images.google.com/images?q=test) I can see text I'm looking for in the latter portion of the line 4 lines up from the bottom.  My understanding of how boo parses the Regex line with it's tokens is very limited so I might be doing something blatantly wrong.  is [^>] the token for marking text to be later called with Groups[n] ? and what is the significance of the asterisks and parenthesis in your example?
Title: CoverDownloader
Post by: david_dl on 2006-08-02 22:23:56
Current code:
Code: [Select]
namespace CoverSources
import System.Text.RegularExpressions
import util
class GoogleImage:
static SourceName as string:
get: return "GoogleImage"
static SourceVersion as decimal:
get: return 0.2
static def GetThumbs(coverart,artist,album):
#         query = artist+" "+album
#         params = EncodeURL(query)
        params = "test"
        text = GetPage("http://images.google.com/images?q="+params)
        r = Regex("""dyn\.img\("([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)"\)""")
        iterator = r.Matches(text)
        coverart.SetCountEstimate(iterator.Count)
        for result as Match in iterator:
            coverart.AddThumb("http://www.images.google.com/images?q=tbn:"+result.Groups[3].Value+result.Groups[4].Value,result.Groups[7].Value,0,0,result.Groups[4].Valu
e)
static def GetResult(param):
        return "http://"+param

Well it's still indicating 0/0 images. I commented out the artist & album and set params to a known-good static string to rule out improper processing of the album & artist.  If I view the source of the page http://images.google.com/images?q=test (http://images.google.com/images?q=test) I can see text I'm looking for in the latter portion of the line 4 lines up from the bottom.  My understanding of how boo parses the Regex line with it's tokens is very limited so I might be doing something blatantly wrong.  is [^>] the token for marking text to be later called with Groups[n] ? and what is the significance of the asterisks and parenthesis in your example?
These Regular Expressions are almost a programming language of their own, and are not specific to Boo. They are incredibly useful for parsing text etc., so anything you learn about them is probably not a waste of time. Scripting languages like Perl have builtin support for regex, as does the .NET framework.

This page outlines the basic syntax:
http://en.wikipedia.org/wiki/Regular_expressions#Syntax (http://en.wikipedia.org/wiki/Regular_expressions#Syntax)

To answer your question, anything in round brackets ( () ), denotes a group, and anything in square brackets denotes a set of characters to match. A caret (^) means 'match all characters except these,', and * means match 0 or more repetitions of these characters, while + means 'one or more'. I used * because some of the groups may be empty. So
Code: [Select]
"([^"]*)"
means: Find two quote signs, and capture (as a group) the text in between them.
Code: [Select]
<img[^>]*>
would match any <img> tag, even if it had arguments, like <img src=blah>.

Hope this helps.

I'm not at home at the moment so I can't test your script, but post back if you are still having trouble and I will help you tonight.
Title: CoverDownloader
Post by: Yotsuya on 2006-08-03 00:21:54
I am continuing to have no luck with this script. Does the script match line-by-line or is it intelligent enough to find multiple instances on the same line?  For example, this page contanes code like this:
Code: [Select]
(blablahblahlotsofuselesscode);dyn.Img("a","","b","c","d","100","100","e","","","f","g","h","","");dyn.Img("a","","b","c","d","100","100","e","","","f","g","h","","");dyn.Img("a","","b","c","d","100","100","e","","","f","g","h","","");

Instead of

Code: [Select]
(blahblahblahlotsofuseesscode);
dyn.Img("a","","b","c","d","100","100","e","","","f","g","h","","");
dyn.Img("a","","b","c","d","100","100","e","","","f","g","h","","");
dyn.Img("a","","b","c","d","100","100","e","","","f","g","h","","");

Where each dyn.Img() represents a different image and a-h is the data I need to pull for use in result.Groups[n]. Value

I will continue to hammer away at this code, but working with this script makes me want to kill things.
Title: CoverDownloader
Post by: david_dl on 2006-08-03 02:27:22
I am continuing to have no luck with this script. Does the script match line-by-line or is it intelligent enough to find multiple instances on the same line?  For example, this page contanes code like this:
Code: [Select]
(blablahblahlotsofuselesscode);dyn.Img("a","","b","c","d","100","100","e","","","f","g","h","","");dyn.Img("a","","b","c","d","100","100","e","","","f","g","h","","");dyn.Img("a","","b","c","d","100","100","e","","","f","g","h","","");

Instead of

Code: [Select]
(blahblahblahlotsofuseesscode);
dyn.Img("a","","b","c","d","100","100","e","","","f","g","h","","");
dyn.Img("a","","b","c","d","100","100","e","","","f","g","h","","");
dyn.Img("a","","b","c","d","100","100","e","","","f","g","h","","");

Where each dyn.Img() represents a different image and a-h is the data I need to pull for use in result.Groups[n]. Value
It should match them,even they are on the same line. In the past I've found this tool helpful for testing regular expressions:
http://www.codeproject.com/dotnet/expresso.asp (http://www.codeproject.com/dotnet/expresso.asp)
Quote
I will continue to hammer away at this code, but working with this script makes me want to kill things.
Please restrict yourself to insects and small rodents
Title: CoverDownloader
Post by: dano on 2006-08-03 10:28:30
You could go on forever, it will never work!

Google sends a different page to the Coverdownloader program than to your web browser.
Google checks the http GET values and if it recognizes a browser you'll get the JS code.
But this program only sends minimal infos and it gets a page with pure html.
Title: CoverDownloader
Post by: david_dl on 2006-08-03 11:12:54
You could go on forever, it will never work!

Google sends a different page to the Coverdownloader program than to your web browser.
Google checks the http GET values and if it recognizes a browser you'll get the JS code.
But this program only sends minimal infos and it gets a page with pure html.


Ah, thanks for that, normally when I develop a script I write the parser based on what I capture in Ethereal.

To get this script to work, you can either dump the html that google is using, either from the script or by capturing packets with ethereal while running the script, and write a parser based on that, or emulate a browser by sending the right headers.

For the latter, a function like this may work (untested):
Code: [Select]
def GetPageAsFirefox(url as string):
            request = System.Net.HttpWebRequest.Create(url)
            request.Headers.Add(System.Net.HttpRequestHeader.UserAgent,"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1b1) Gecko/20060707 Firefox/2.0b1")
            response = request.GetResponse()
            s=System.IO.StreamReader(response.GetResponseStream())
             return s.ReadToEnd()
Title: CoverDownloader
Post by: Yotsuya on 2006-08-03 19:47:14
Thank you for the expresso link david, that is a very useful tool and it appears the string you ave me awhile back was proper and I spent most of my time last evening coding around in circles.

Thanks for the info dano, I didnt think to look at useragent strings. I plugged in some random strings for my firefox useragent and you are right google is playing dirty.  I'm sure google isnt the only site out there that imploys this easy check to annoy developers, david have you considered adding a configurable useragent string in the CoverDownloader program itself? Many download managers have this option for precisely this reason.

Looks like I've picked a hell of a site to work with, I'll try stabbing away with your firefox function and see what happens.
Title: CoverDownloader
Post by: Yotsuya on 2006-08-03 20:07:35
Using this (http://en.wikipedia.org/wiki/User_agent) page as a reference, I replaced the def GetPage in util.boo with this slight variation on your code:
Code: [Select]
def GetPage(url as string):
            request = System.Net.HttpWebRequest.Create(url)
            request.Headers.Add(System.Net.HttpRequestHeader.UserAgent,"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4")
            response = request.GetResponse()
            s=System.IO.StreamReader(response.GetResponseStream())
            return s.ReadToEnd()

At first I tried it as a separate function and called that with my GoogleImage script however it did not work.  I then replaced the normal GetPage function to see if it would atleast work with the existing Amazon script.  It did indeed work with Amazon. And while maybe it just had to do with the time of day and what I searched for but with the above GetPage routine the amazon page appeared to return the results much faster than with the original routine.

So, assuming this new function is working I guess I'll return to my original script.
Title: CoverDownloader
Post by: david_dl on 2006-08-03 20:16:24
Using this (http://en.wikipedia.org/wiki/User_agent) page as a reference, I replaced the def GetPage in util.boo with this slight variation on your code:
Code: [Select]
def GetPage(url as string):
            request = System.Net.HttpWebRequest.Create(url)
            request.Headers.Add(System.Net.HttpRequestHeader.UserAgent,"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4")
            response = request.GetResponse()
            s=System.IO.StreamReader(response.GetResponseStream())
            return s.ReadToEnd()

At first I tried it as a separate function and called that with my GoogleImage script however it did not work.  I then replaced the normal GetPage function to see if it would atleast work with the existing Amazon script.  It did indeed work with Amazon. And while maybe it just had to do with the time of day and what I searched for but with the above GetPage routine the amazon page appeared to return the results much faster than with the original routine.

So, assuming this new function is working I guess I'll return to my original script.

Interesting, because the amazon script uses the amazon web services, which is an xml/soap based service designed especially for this sort of thing and returns pages like this:
http://xml.amazon.com/onca/xml3?f=xml&...h=iron%20maiden (http://xml.amazon.com/onca/xml3?f=xml&t=webservices-20&dev-t=1MV23E34ARMVYMBDZB02&type=lite&page=1&mode=music&KeywordSearch=iron%20maiden)
Title: CoverDownloader
Post by: Yotsuya on 2006-08-03 20:25:38
Well the amazon script seems to work fine with this new function, however both walmart and my googleimage scripts are kicking out this error:
(http://img197.imageshack.us/img197/3316/errorbv4.png) (http://imageshack.us)

And for reference here is my current GoogleImage.boo:
Code: [Select]
namespace CoverSources
import System.Text.RegularExpressions
import util
class GoogleImage:
static SourceName as string:
get: return "GoogleImage"
static SourceVersion as decimal:
get: return 0.2
static def GetThumbs(coverart,artist,album):
#         query = artist+" "+album
#         params = EncodeURL(query)
#         params.Replace('%20','+')
        params = "test"
        text = GetPage("http://images.google.com/images?q="+params)
        r = Regex("""dyn\.Img\("([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)"\)""")
        iterator = r.Matches(text)
        coverart.SetCountEstimate(iterator.Count)
        for result as Match in iterator:
            coverart.AddThumb("http://www.images.google.com/images?q=tbn:"+result.Groups[3].Value+result.Groups[4].Value,result.Groups[7].Value,0,0,result.Groups[4].Valu
e)
static def GetResult(param):
        return "http://"+param

Upon further examination the amazon script does not use GetPage so the percieved performance boost must have been due to what I was searching for and the time of day. It also explains why it behaves differently than the other scripts with the new function.  So I guess I'm back to the useragent routine. What is the name parameter that the error is referring to?
Title: CoverDownloader
Post by: unabatedshagie on 2006-08-04 15:36:59
I'm using the latest beta version (0.4 a) and I have a couple of suggestions, would it be possible to have the size of the cover either appear below the cover or show up in a tooltip when hovered. With the amazon covers especially some of them are very low quality and having to right click and preview them to see the size is a bit slow.

Also as someone else mentioned above the browser saves the art to the same folder as the track it's checking not in the folder you specify at the top.
Title: CoverDownloader
Post by: david_dl on 2006-08-04 23:14:30
I'm using the latest beta version (0.4 a) and I have a couple of suggestions, would it be possible to have the size of the cover either appear below the cover or show up in a tooltip when hovered. With the amazon covers especially some of them are very low quality and having to right click and preview them to see the size is a bit slow.

As discussed before, this is not possible without downloading all the full-sized images. However you can middle click instead of right clicking to preview directly.

Quote
Also as someone else mentioned above the browser saves the art to the same folder as the track it's checking not in the folder you specify at the top.


Are you sure? It seems to work properly for me. The way it is designed is that when you switch to another task the path selected in the 'Save To:' box will switch to what its value was when that track was added, so you have to select the path after changing task, if you want to save it elsewhere.
Title: CoverDownloader
Post by: AlexVallat on 2006-08-13 20:56:51
Hi, first off I just want to say how much I appreciate this tool - it's great!

You've mentioned a couple of times about not being able to show the full image size without downloading them, which makes sense. I'm not sure what your objection to downloading the full sized images is, though. Unless you are paying by the byte, I suspect the difference in size between a 10k medium and 30k large amazon image is hardly worth the bother.

Anyway, for those of us who don't mind the penalty of always downloading large images, here's a modified amazon boo script that will put the size of the large image either in the image itself, or in the label of the image (set the two constants near the top of the file to taste).

Code: [Select]
namespace CoverSources
import System.Xml
import System.Drawing
import util

class Amazon:
static AddSizeToImage = true //If true, this will add a caption to the top-left of the image with the size.
static AddSizeToLabel = false //If true, this will put the size in the label. Note that this will spoil bold higlighing of exact matches
static ThumbSize = Size(200, 200) //Size here should match thumbnail size in CoverDownloader settings for best results

static SourceName as string:
get: return "Amazon"
static SourceVersion as decimal:
get: return 0.2
static def GetThumbs(coverart,artist,album):
x=System.Xml.XmlDocument()
x.Load("http://xml.amazon.com/onca/xml3?f=xml&t=webservices-20&dev-t=1MV23E34ARMVYMBDZB02&type=lite&page=1&mode=music&KeywordSearch="+EncodeUrl(artist+" "+album))
results=x.GetElementsByTagName("Details")
coverart.SetCountEstimate(results.Count)
for node in results:
large = System.Drawing.Bitmap.FromStream(GetPageStream(node["ImageUrlLarge"].InnerText))
if large.Height>10:
caption = System.String.Format("{0} x {1}", large.Width, large.Height)

//Create the thumbnail.
thumb = Bitmap(large, ThumbSize)
large.Dispose()

//Caption the image
if AddSizeToImage:
g = Graphics.FromImage(thumb)
f = Font(SystemFonts.DefaultFont, FontStyle.Bold)
g.DrawString(caption, f, Brushes.White, 1,1 )
g.DrawString(caption, f, Brushes.Black, 0,0 )
f.Dispose()
g.Dispose()

label = node["ProductName"].InnerText
//Add the size to the label
if AddSizeToLabel:
label = System.String.Format("{0} ({1})", label, caption)

coverart.AddThumb(thumb,label,0,0,node["ImageUrlLarge"].InnerText)
static def GetResult(param):
return param
Title: CoverDownloader
Post by: directjj on 2006-08-14 16:48:35
Not sure if this could be added, but hi-res and easy (for a human) to use: http://www.thejosher.net/iTunes/search.php (http://www.thejosher.net/iTunes/search.php)


I tried that site, looks good but when I mouse to get bigger picture Internet Explorer says "You are not authorized to view this page"

Can you tell me how to get around that?
Title: CoverDownloader
Post by: directjj on 2006-08-14 17:01:34
[quote name='david_dl' date='Aug 4 2006, 18:14' post='417963']
[quote name='unabatedshagie' post='417828' date='Aug 5 2006, 03:36'] I'm using the latest beta version (0.4 a) and I have a couple of suggestions, would it be possible to have the size of the cover either appear below the cover or show up in a tooltip when hovered. With the amazon covers especially some of them are very low quality and having to right click and preview them to see the size is a bit slow.
[/quote]

Where is the link to latest version?

Does it still do Buy.com? Usually Buy.com has bigger / higher resolution images than Amazon.com and more selection than Walmart.com

A while back Buy.com made a change which made it more difficult to download their bigger images manually.

A work around is not to left click on the small image, but right click, open in new window, you will get some IE error message. Go into the address bar and strip off everything right of the  .jpg and everything left of http and you will see the big image in your browser which you can download to your PC manually.
Title: CoverDownloader
Post by: pepoluan on 2006-08-14 19:31:05
A work around is not to left click on the small image, but right click, open in new window, you will get some IE error message. Go into the address bar and strip off everything right of the  .jpg and everything left of http and you will see the big image in your browser which you can download to your PC manually.
Why would you have to do that? Right-clicking in Firefox I see that the URL of the shown image is identical to the URL in the JavaScript "Enlarge" link.

So I just right-click on the image, and choose "Save image as...", and it's the big image that gets saved, not the scaled-down version.
Title: CoverDownloader
Post by: directjj on 2006-08-15 03:13:59
A work around is not to left click on the small image, but right click, open in new window, you will get some IE error message. Go into the address bar and strip off everything right of the  .jpg and everything left of http and you will see the big image in your browser which you can download to your PC manually.
Why would you have to do that? Right-clicking in Firefox I see that the URL of the shown image is identical to the URL in the JavaScript "Enlarge" link.

So I just right-click on the image, and choose "Save image as...", and it's the big image that gets saved, not the scaled-down version.


Wow, I think you are right. This will save me some time. I know they made a change and I thought it was to prevent people from downloading their images. I forget how things used to work. I think maybe just clicking on the image launched the large image in a new browser window. I thought they had put in some security & I had found a work around.

Anyhow their images seem bigger / higher rez than Amazon.com.

Have to resize them in Photoshop to 4.8" x 4.75" (I resize to 4.8 x 4.8 and then lop off the .05 with resize document or whatever.)

Thanks.
Title: CoverDownloader
Post by: pepoluan on 2006-08-16 18:23:36
Anyhow their images seem bigger / higher rez than Amazon.com.
I found out that bigger does not always mean better. I got 2 album arts of the same CD, one in 300x300 the other in 500x500. The latter one has very visible yellowish tinge, ugh.

Have to resize them in Photoshop to 4.8" x 4.75" (I resize to 4.8 x 4.8 and then lop off the .05 with resize document or whatever.)
Why? Any reason for this?
Title: CoverDownloader
Post by: directjj on 2006-08-16 22:56:04
[quote name='pepoluan' date='Aug 16 2006, 13:23' post='421378']
I found out that bigger does not always mean better. I got 2 album arts of the same CD, one in 300x300 the other in 500x500. The latter one has very visible yellowish tinge, ugh.

[quote name='directjj' post='420831' date='Aug 15 2006, 09:13']
Have to resize them in Photoshop to 4.8" x 4.75" (I resize to 4.8 x 4.8 and then lop off the .05 with resize document or whatever.)[/quote]

Some people have crummy scanners & some people don't know how to use their scanner.

For example CD Art is not a photo in the sense of a photographic print. Its not continuous tone but four color process. I find that if I do not turn on the descreening filter in the Epson Scan Utility the result will be speckled, and a lot of images scanned by individuals you get off the Internet are speckled like this.

Photoshop Elements Filter / Noise / Despeckle will eliminate some of this but I'm sure it was because the right settings were checked by the person scanning the art. Turning on the descreening filter in the Scanning software before you do any editing solves this problem.

In fact the higher the resolution I set the worse the problem becomse unless you check the descreening filter.

Another setting you can play with is the UnSharp mask, but I don't fool with it.

Once I have the photo from my own scan, or Buy.com, Amazon.com, or some other download (Usenet, P2P) I almost always tweak it in some way in Photoshop Elements before printing.

To save ink I will invert the image if it is white letters on a black background (back of the Jewel case). Some times I bump up the contrast or lighten the image. Often I lighten shadows. I'm printing on high quality plain paper (not coated) with a four color printer pigment based ink and lightening the image makes it brighter and probably saves a little ink too.

[quote name='pepoluan']Why? Any reason for this?
[/quote]

Even if I did not edit it in any other way, none of the photos from Buy.com, Amazon.com have the print dimensions equal to a CD Jewel Case.

E.G. Buy.com & Walmart I think are 6.944" X 6.944" and 72 dots per inch.

The Photoshop Print Dialog has a way to print the image a different size but I just resize the image.

I like a snug fit and in inches the Jewel Case Front is 4.75" high. I could resize to
4.75 x 4.75 but the Jewel Case can accomodate 4.8" wide. If I want to resample I could in one operation do a 4.8" x 4.75" but this is changing the proportionality a little and resampling, like stretching a rubber band to make it thinner.

Just reducing to 4.8 x 4.8 is going to lessen quality some and maybe I'm stupid but I think keeping the aspect ratio the same (no resampling), reducing to 4.8 x 4.8 and then "trimming .05 of either the top, or the bottom or .025 off both (depending on what the art is and what you are lopping off) is going to yield better quality.

Anyhow the 4.8" is now 104.167 dots per inch.

If I don't like the look of the Buy.com image, I will check Walmart, and finally Amazon.com.

A handful of Amazon .jpgs are the same size as Buy.com & Walmart 6.944" X 6.944" and 72 dots per inch. They may be moving in that direction. Usually in the past they are 72 dpi but at a dimension smaller than 4.8 x 4.8, so when you increase the size of the image you dilute the dpi and instead of ending up with 104dpi I think you end up with about 52 dpi. Sometimst the image is 6.944 with a big white border you have to get rid of.

I was suprized to see downloading the Buy.com picture is the same whether or not you enarlge it in the browser first. This doesn't seem to be the case with Amazon.

My test show once you are on the album page (not a search for artist page) downloading the relatively big photo with a right click does not get you  the same file as if you first enlarge by clicking on the image (opening a popup browser window) and then right clicking to download the picture.
Title: CoverDownloader
Post by: david_dl on 2006-08-17 04:53:08
[quote name='pepoluan' date='Aug 16 2006,
Once I have the photo from my own scan, or Buy.com, Amazon.com, or some other download (Usenet, P2P) I almost always tweak it in some way in Photoshop Elements before printing.


Just out of interest, why do you print album art? I thought generally the problem was that people have a hardcopy of the art (in their CD jewel case) and want a digital representation on their computer (so that they can associate it with the ripped tracks.) Downloading art off the internet is of course a lot easier than scanning it yourself.

The only type of person who would print album art at home that I can think of is a pirate, but I'm sure you have a legitimate reason
Title: CoverDownloader
Post by: directjj on 2006-08-17 17:33:02
[quote name='pepoluan' date='Aug 16 2006,
Once I have the photo from my own scan, or Buy.com, Amazon.com, or some other download (Usenet, P2P) I almost always tweak it in some way in Photoshop Elements before printing.


Just out of interest, why do you print album art? I thought generally the problem was that people have a hardcopy of the art (in their CD jewel case) and want a digital representation on their computer (so that they can associate it with the ripped tracks.) Downloading art off the internet is of course a lot easier than scanning it yourself.

The only type of person who would print album art at home that I can think of is a pirate, but I'm sure you have a legitimate reason


What can I say. Art & Music are available on public websites & public newsgroups hosted by my ISP for free & then there are pay sites for music. Premium News Services sell "binary retention" as a feature. Who am I to quibble.

If you were to go to Itunes or Napster (a legitimate business now) or any other pay for music site and you paid to download music, and you wanted to play that music you bought in your car stereo, you might want to burn it to CD and you might want to print a Jewel Case Insert.

Sony dominates the music business & Sony sells CD Burners & CD Blanks. Why is that?

Computer Printer Manufacturers build printers that print on CD Labels & actual CD's and CD manufacturers make printable CD's. Why is that?

XM Radio customers pay for XM music and XM Corporation pays the recording industry for the music they play but XM Corporation then gets sued for making a device that allows the XM customer to record the music he has paid for through XM so he can play when he wants to. Why is that?

Don't get me wrong. I'm all for musicians making money & getting paid for their work. Not so sure about the Sony executives.
Title: CoverDownloader
Post by: cartman(2vd) on 2006-09-10 15:00:28
Is this project dead? ive seen david_dl somewhere around the forum saying that he quit working on this... it would be really pitty but if so can anyone propose other solution how to download cover art?
Title: CoverDownloader
Post by: Stanbey on 2006-09-10 16:26:45
Hi.

First, thanks for the work. Very handy.

Second, a feature request... or maybe a request for someone to say "don't be a spanner, do this..."

I am trying to get albumart.exe to work from mareo / EAC. The cunning plan is that I drop a CD into my CD-ROM and EAC rips it to flac and aac, sources an appropriate album-art image and saves it in the album folder, and then pokes my SlimServer to tell it the library has changed. The only problem I am having is that albumart.exe is holding things up. I have this in my mario.ini:

;======
;Album art downloader
;======

EXECUTEIF = [TRACK] = 1
FINALPATH = X:\Music\Converted\AAC\[ARTIST]\[ALBUM]\
FINALNAME = cover
EXTENSION = jpg
ENCODEREXE = albumart.exe
PARAMETERS = "[ARTIST]" "[ALBUM]" "[FINALPATH]\[FINALNAME].[EXTENSION]"
RENAME = FALSE

Which works fine in that albumart pops up and shows me the matches that it has found, but then it just sits there waiting for me to do something. What I would like it to do is to download the first/best match it finds and then exit; all without user intervention. Is there currently any way to get it to do this? If not, is this a feature that could be added?

Regards,
Stanbey
Title: CoverDownloader
Post by: dummptyhummpty on 2006-09-13 04:14:30
I read some where that the new version of iTunes released today will add image art. Any way to add that to this program?
Title: CoverDownloader
Post by: Music^Hound on 2006-09-16 12:15:06
You need to be a member of itunes in order to utilize the covers
Title: CoverDownloader
Post by: gumbulak on 2006-09-16 16:16:40
Hello!

Does anybody know how to write a script for searching covers on Amazo.de. I#ve got a lot of german audiobooks without covers.

Thanx for reply
Title: CoverDownloader
Post by: strubbl on 2006-09-16 19:00:43
Hello!

Does anybody know how to write a script for searching covers on Amazo.de. I#ve got a lot of german audiobooks without covers.

Thanx for reply


yeah, did that some days ago. all you have to do is to add &locale=de in the url in the amazon.boo file.
(Valid locales are: jp de fr uk us ca)
You also can ask several ones of them at once (by making individual .boo files) but that's a bit tricky...
It's on my other computer - i'll post it when i'm there.

I also changed the commandline string so that it only searches for album if it's a VA album... post that later, too.

... another hint:
If you start coverdownloader.exe, it takes quite a while to produce some results. But if you leave it open and just call it again with another album, the search results are almost immediately (but the covers are still stored in the right locations).
So i made it like this:
1) Assign the run-command to a key
2) "run" trough your music collection and press the key for every album
3) once you have done this about 10-15 times, go to coverdownloader and just keep on doubleclicking the right covers (with "close after saving art" enabled)
... like this, you will be able to download over 10 album arts per minute - it's the fastest way imaginable!

So, finally a BIG BIG thanks to the author of this great "plugin"!!!
Title: CoverDownloader
Post by: Yotsuya on 2006-09-16 19:24:30
Has anyone had any success in getting coverdownloader to work work with google image? I tried earlier but was unable to get this program to spoof a valid useragent string.
Title: CoverDownloader
Post by: david_dl on 2006-09-17 01:05:17
You need to be a member of itunes in order to utilize the covers


I heard about this and wasted my time installing iTunes 7, to get the album art you need an iTunes store account, and the bastards don't even have an option for New Zealand and wont accept NZ credit cards.
Title: CoverDownloader
Post by: Tich on 2006-09-18 18:49:42
It is now possible to fetch Itunes Albumart again 
see the details here (http://printf.dk/itunes_7_fetching_artwork_for.html) or try the demo here (http://opentheweb.org/i7AWF_demo.php). 
I hope david_dl gets arround to porting it to .boo and an update will get release soon 

thanks for your fantastic work david_dl! I really appreciate it.
Tich
Title: CoverDownloader
Post by: david_dl on 2006-09-22 10:35:47
iTunes support added, see first post.
Title: CoverDownloader
Post by: carmenm on 2006-09-22 10:45:00
Thanks a lot david_dl 
Title: CoverDownloader
Post by: david_dl on 2006-09-22 11:01:48
And to whoever was working on the Google script, the new iTunes script shows how the User-Agent can be faked.
Title: CoverDownloader
Post by: Funkstar De Luxe on 2006-09-22 11:51:18
I get this error from ITMS

(http://img233.imageshack.us/img233/1764/untitled2hn7.th.png) (http://img233.imageshack.us/my.php?image=untitled2hn7.png)
Title: CoverDownloader
Post by: sandb0y on 2006-09-22 13:03:34
I get this error from ITMS

(http://img233.imageshack.us/img233/1764/untitled2hn7.th.png) (http://img233.imageshack.us/my.php?image=untitled2hn7.png)

same here
also when i try to save some cover, the save as type combo i empty, and format is inactive
Title: CoverDownloader
Post by: mazy on 2006-09-22 21:59:18
david_dl, i have few requests:
Title: CoverDownloader
Post by: david_dl on 2006-09-22 22:50:59
david_dl, i have few requests:
  • way to save album art while being previewed (maybe as doubleclick on it or from context menu; it could even close the window on doubleclick - would save few clicks).
This feature has existed for quite a while now, try double clicking the Preview window 
Quote
[/li][li] maybe "save as..." could start in the folder specified in "save to:" edit box
Hmm, it used to, but I messed it up.
Quote
[/li][li] quick way (probably as another context menu entry) to save image with name pre-set in the save dialog to artist - album string. it should remember the folder used between sessions (as "save as..." does now). the reason i would like this is that while searching for album art i sometimes get results which are not the right ones but interesting ones nonetheless. i would like to save them to one folder with name set to their titles to look the up later.
[/li][/list]Good idea. I've added the source code to the first post, so feel free to add these modifications yourself, the C# shouldn't be hard to get to grips with even if you've never used C# before. Be sure to upload anything you feel is useful in this forum, so others (including me  ) can benefit. The license requires you to include source code with any modified version (My binary versions aren't under this license which is why they don't include source).
Title: CoverDownloader
Post by: Yotsuya on 2006-09-23 00:10:46
And to whoever was working on the Google script, the new iTunes script shows how the User-Agent can be faked.

I tried incorporating the useragent routine into the script but I am unable to get the script to even compile anymore. I am in well over my head with regards to this script and have no idea what I am doing anymore. If anyone else would like to take over or at the very least give me some direction on where to go from here, this is the current state of my code:

Code: [Select]
namespace CoverSources
import System.Xml
import System.Drawing
import System.Text.RegularExpressions
import util
import ICSharpCode.SharpZipLib

class GoogleImage:
static def GetPageSecret(url as string):
request as System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url)
request.UserAgent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)"
response = request.GetResponse()
return response.GetResponseStream()
static SourceName as string:
get: return "GoogleImage"
static SourceVersion as decimal:
get: return 0.2
static def GetThumbs(coverart,artist,album):
# query = artist+" "+album
# params = EncodeURL(query)
# params.Replace('%20','+')
params = "test"
text = GetPageSecret("http://images.google.com/images?q="+params)
r = Regex("""dyn\.Img\("([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)"\)""")
iterator = r.Matches(text)
coverart.SetCountEstimate(iterator.Count)
for result as Match in iterator:
coverart.AddThumb("http://www.images.google.com/images?q=tbn:"+result.Groups[3].Value+result.Groups[4].Value,result.Groups[7].Value,0,0,result.Groups[4].Valu
e)
static def GetResult(param):
return "http://"+param
Title: CoverDownloader
Post by: david_dl on 2006-09-23 00:23:11
And to whoever was working on the Google script, the new iTunes script shows how the User-Agent can be faked.

I tried incorporating the useragent routine into the script but I am unable to get the script to even compile anymore. I am in well over my head with regards to this script and have no idea what I am doing anymore. If anyone else would like to take over or at the very least give me some direction on where to go from here, this is the current state of my code: ... ...

It was almost working, I've made a few changes, this seems to work perfectly:
Code: [Select]
namespace CoverSources
import System.Xml
import System.Drawing
import System.Text.RegularExpressions
import util

class GoogleImage:
    static def GetPageSecret(url as string):
        request as System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url)
        request.UserAgent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)"
        response = request.GetResponse()
        return response.GetResponseStream()
    static SourceName as string:
        get: return "GoogleImage"
    static SourceVersion as decimal:
        get: return 0.2
    static def GetThumbs(coverart,artist,album):
        query = artist+" "+album
        params = EncodeUrl(query)
        params.Replace('%20','+')
        textstream = GetPageSecret("http://images.google.com/images?q="+params)
        text = System.IO.StreamReader(textstream).ReadToEnd()
        r = Regex("""dyn\.Img\("([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)"\)""")
        iterator = r.Matches(text)
        coverart.SetCountEstimate(iterator.Count)
        for result as Match in iterator:
            name=(result.Groups[7].Value.Replace("<b>","").Replace("</b>",""))
            coverart.AddThumb("http://www.images.google.com/images?q=tbn:"+result.Groups[3].Value+result.Groups[4].Value,name,0,0,result.Groups[4].Value)
    static def GetResult(param):
        return param
Title: CoverDownloader
Post by: Yotsuya on 2006-09-23 00:26:12
Yay!

/me buys david a beer.
Title: CoverDownloader
Post by: Yotsuya on 2006-09-23 00:37:01
I get this error from ITMS

(http://img233.imageshack.us/img233/1764/untitled2hn7.th.png) (http://img233.imageshack.us/my.php?image=untitled2hn7.png)


I do not know for sure but I think that error may equate to "album not found". I've been able to find many covers off ITMS but most of my more obscure albums generate the error your mentioned.
Title: CoverDownloader
Post by: david_dl on 2006-09-23 01:03:37

I get this error from ITMS

(http://img233.imageshack.us/img233/1764/untitled2hn7.th.png) (http://img233.imageshack.us/my.php?image=untitled2hn7.png)


I do not know for sure but I think that error may equate to "album not found". I've been able to find many covers off ITMS but most of my more obscure albums generate the error your mentioned.


This appears to be the case. I've updated the download in the first post to include the Google script and an improved iTMS script that doesn't give this error.
Title: CoverDownloader
Post by: aurelio on 2006-09-23 13:22:11
david_dl, thank you for this great tool.
Here I have a request: is it possible to get the picture size (W x H) displayed next to its title?
Title: CoverDownloader
Post by: tomthomson on 2006-09-23 13:27:27
thanks for including two new scripts - they work like very well here

Quote
Here I have a request: is it possible to get the picture size (W x H) displayed next to its title?

Oh, I would like see that feature, too.
Title: CoverDownloader
Post by: cartman(2vd) on 2006-09-23 15:58:17
thanks for including two new scripts - they work like very well here

Quote
Here I have a request: is it possible to get the picture size (W x H) displayed next to its title?

Oh, I would like see that feature, too.


afaik it needs to download all search results and mesure them so it does a lot of unecessary trafic... but there was one version of amazon script which did this but never official.
Title: CoverDownloader
Post by: aurelio on 2006-09-23 17:45:19
I don't know about dealing with the other sources, but Google Image Search shows the picture size directly on the result page.
Title: CoverDownloader
Post by: Jojo on 2006-09-23 20:32:38
how can I completely uninstall the new version? i.e where are the settings stored?
Title: CoverDownloader
Post by: Andrea on 2006-09-23 21:44:34
Nice job, I'm using it right now! I love the fact and I can use it to fetch the itunes covers
Title: CoverDownloader
Post by: david_dl on 2006-09-24 01:45:42
how can I completely uninstall the new version? i.e where are the settings stored?

Code: [Select]
%userprofile%\Local Settings\Application Data\Damage,_Inc

Just delete everything in there.
Title: CoverDownloader
Post by: david_dl on 2006-09-24 05:35:38
david_dl, thank you for this great tool.
Here I have a request: is it possible to get the picture size (W x H) displayed next to its title?


All the code needed to do it is there, to tell the truth I can't be bothered with this, as the program does everything I need. However the source code is available on the first page in the hope that someone will improve it by adding stuff like this.
Title: CoverDownloader
Post by: Stuart60611 on 2006-09-24 06:30:39
Can this do batch downloading of all ocvers for a group of files?
Title: CoverDownloader
Post by: apul on 2006-09-24 10:32:33
New Version (Experimental):

Sweet. Thank you so much for this awesome tool. The iTunes covers are so damn good. Thanks again.
Title: CoverDownloader
Post by: apul on 2006-09-24 10:33:19
New Version (Experimental):

Sweet. Thank you so much for this awesome tool. The iTunes covers are so damn good. Thanks again.
Title: CoverDownloader
Post by: unknownllama on 2006-09-25 02:27:46
Is there any way to be able to use last.fm artist images as a source?

Similar to the capability of foo_run to go to the page?
"http:$char(47)$char(47)www.last.fm$char(47)music$char(47)$replace(%album artist%%, ,$char(43))$char(47)$char(43)images"
Title: CoverDownloader
Post by: Yotsuya on 2006-09-25 02:44:48
I'd be willing to take a whack at a last.fm scraper but do they have actual album art pages? The foo_run string you gave is for artist images, not album specific images.
Title: CoverDownloader
Post by: unknownllama on 2006-09-25 03:10:08
I was actually interesting specifically in artist images, but album covers would be nice too.
Title: CoverDownloader
Post by: Scidd0w on 2006-09-25 10:25:45
I just want to thank you for this great tool david_dl!
I never used a album/cover art plugin before because of all the hassle to download all the covers for all my albums.
Now this weekend I installed your tool in combo with foo_run and all my albums have cover art now!
Title: CoverDownloader
Post by: strubbl on 2006-09-25 13:02:22
As promised, here are my tips:

Use
"C:\Programme\foobar2000\coverdownloader\albumart.exe" "$ascii($if($meta(album artist),,%artist%))" "$ascii(%album%)" "$replace(%_path%,%_filename_ext%,)cover.jpg"
with foo_run.
It doesn't take the artist if its a VA album. And with $ascii() it can deal with stupid caracters such as äöüß ...

Here's the script to use the german amazon-service together with the "normal" (us) one.
Code: [Select]
namespace CoverSources
import System.Xml
import System.Drawing
import util

class Amazonde:
    static SourceName as string:
        get: return "Amazon-de"
    static SourceVersion as decimal:
        get: return 0.2
    static def GetThumbs(coverart,artist,album):
        x=System.Xml.XmlDocument()
        x.Load("http://xml.amazon.com/onca/xml3?f=xml&t=webservices-20&dev-t=1MV23E34ARMVYMBDZB02&type=lite&page=1&mode=music&locale=de&KeywordSearch="+EncodeUrl(artist+" "+album))
        results=x.GetElementsByTagName("Details")
        coverart.SetCountEstimate(results.Count)
        for node in results:
            thumb=System.Drawing.Bitmap.FromStream(GetPageStream(node["ImageUrlMedium"].InnerText))
            if thumb.Height>10:
                coverart.AddThumb(thumb,node["ProductName"].InnerText,300,300,node["ImageUrlLarge"].InnerText)
        
    static def GetResult(param):
        return param


... david_dl, thanks for adding Google&Itunes! Now its useful for rarer albums too! Once more: Great prog!!!

but what's the browser for - how do i use it?
Title: CoverDownloader
Post by: Coppertop on 2006-09-25 13:23:05
Would it be possible to use www.discogs.com as a source? They have some covers that I haven't seen anywhere else.
Title: CoverDownloader
Post by: Funkstar De Luxe on 2006-09-25 18:14:51
Two very simple questions that are holding me back.  What do I type to find Various Artists albums in Itunes?  How do I use the browser?

:-D
Title: CoverDownloader
Post by: david_dl on 2006-09-25 21:33:42
As promised, here are my tips:

Use
"C:\Programme\foobar2000\coverdownloader\albumart.exe" "$ascii($if($meta(album artist),,%artist%))" "$ascii(%album%)" "$replace(%_path%,%_filename_ext%,)cover.jpg"
with foo_run.
It doesn't take the artist if its a VA album. And with $ascii() it can deal with stupid caracters such as äöüß ...
The program should be able to deal with such characters, they work for me, when I search for 'Mötley Crüe' or 'Ágætis Byrjun'
Quote
Here's the script to use the german amazon-service together with the "normal" (us) one.
Code: [Select]
namespace CoverSources
import System.Xml
import System.Drawing
import util

class Amazonde:
    static SourceName as string:
        get: return "Amazon-de"
    static SourceVersion as decimal:
        get: return 0.2
    static def GetThumbs(coverart,artist,album):
        x=System.Xml.XmlDocument()
        x.Load("http://xml.amazon.com/onca/xml3?f=xml&t=webservices-20&dev-t=1MV23E34ARMVYMBDZB02&type=lite&page=1&mode=music&locale=de&KeywordSearch="+EncodeUrl(artist+" "+album))
        results=x.GetElementsByTagName("Details")
        coverart.SetCountEstimate(results.Count)
        for node in results:
            thumb=System.Drawing.Bitmap.FromStream(GetPageStream(node["ImageUrlMedium"].InnerText))
            if thumb.Height>10:
                coverart.AddThumb(thumb,node["ProductName"].InnerText,300,300,node["ImageUrlLarge"].InnerText)
        
    static def GetResult(param):
        return param


... david_dl, thanks for adding Google&Itunes! Now its useful for rarer albums too! Once more: Great prog!!!

but what's the browser for - how do i use it?


Excellent, I didn't realise the German version of amazon would actually have different products for sale.

The browser requires foo_comserver installed, when you have this installed, open the browser and click the refresh button on the toolbar. It will load your media library from foobar2000, and look for the filename you specify under 'Default Art Filename' in settings in the same folder as every album in your library. Albums with this file get a green tick, a red cross means they lack art. You can double click on any album to add it to the queue, and when the browser has finished loading, you can click the little clock button on the toolbar to add all the albums that lack art to the queue in one go.
Title: CoverDownloader
Post by: Tirade on 2006-09-26 19:31:22
A++ if you have a paypal acct Id gladly donate towards the effort to keep this going.

I do have one question and maybe its something Im overlooking...

Can this be made to function using directory structures? As an example, a small window pane on the left hand side showing the directory structure so that you can click the directory and it will use the directoy name as the info required for the search (i.e. I have Z:/Music/Madonna - Ray of Light), or maybe it can simply scan the FLAC file for the tag information it needs.

Album Cover Art Downloader does this. You select the album, it searches for the art and you click the button to save it to your folder. No typing is needed and this is a HUGE time saver.

I have over 1600+ CD's in my library and I want to use your program to find covers for all them, and having to type each one in and then select the output directory, etc etc, its a long long process.
Title: CoverDownloader
Post by: Yotsuya on 2006-09-26 19:48:26
Tirade: You should be able to use $directory(%path%,1) or similar as a parameter in your foo_run string to pass the album's directory name as the field to search by when you launch cover downloader.
Title: CoverDownloader
Post by: strubbl on 2006-09-26 20:07:08
Two very simple questions that are holding me back.  What do I type to find Various Artists albums in Itunes?  How do I use the browser?

:-D


Just the album name & leave artist blank. My run-code (see above) does this automatically.


@david_dl: Wow, this browser-feature sounds AMAIZING! I'll try it when i'm back from my parents...
for me, coverdownloader produced no results with äöü - but with $ascii() it works fine. Maybe this depends on the language of the OS or other stuff? (mine's german...)

edit: i'm using win2k btw.
... but the thing with displaying (W x H) really would be great, as you don't want to accidentially download 150x150-covers when there are also 500x500ers to display in your 300x300 album art view.
Title: CoverDownloader
Post by: Tirade on 2006-09-26 20:10:12
Tirade: You should be able to use $directory(%path%,1) or similar as a parameter in your foo_run string to pass the album's directory name as the field to search by when you launch cover downloader.


I use a squeezebox and do not use foobar for playing music.

Is there a way to have the program show a directory tree like other art downloaders?
Title: CoverDownloader
Post by: Tomacco_Boy on 2006-10-07 04:01:56
I'd like to request a script to download album art from discogs and from saikosounds for psychedelic album art if its possible, i'd be appreciated.
Title: CoverDownloader
Post by: AlexVallat on 2006-10-07 10:04:22
A couple of people have requested a discogs script, so I thought I'd have a go.

Enjoy.

Code: [Select]
namespace CoverSources
import System
import System.Text
import System.Text.RegularExpressions
import util

class Discogs:
static SourceName as string:
get: return "Discogs"
static SourceVersion as decimal:
get: return 0.1
static def GetThumbs(coverart,artist,album):
query as string = artist + " " + album
query.Replace(' ','+')
obidResults = GetPage(String.Format("http://www.discogs.com/search?type=all&q={0}", EncodeUrl(query)))

//Get obids
obidRegex = Regex("<a href=\"/release/(?<obid>\\d+)\"><span[^>]+>[^-]+- (?:</?em>|(?<name>[^<-]+))+</span>", RegexOptions.Multiline)
obidMatches = obidRegex.Matches(obidResults)
coverart.SetCountEstimate(obidMatches.Count) //Probably more than this, as some releases might have multiple images

for obidMatch as Match in obidMatches:
//Construct the release name by joining up all the captures of the "name" group
releaseNameBuilder = StringBuilder()
for namePart in obidMatch.Groups["name"].Captures:
releaseNameBuilder.Append(namePart)

releaseName = releaseNameBuilder.ToString()

//Get the image results
imageResults = GetPage(String.Format("http://www.discogs.com/viewimages?what=R&obid={0}&showpending=1", obidMatch.Groups["obid"].Value))
imageRegex = Regex("<img src=\"(?<url>http://www\\.discogs\\.com/image/R-\\d+-\\d+.jpe?g)\" width=\"(?<width>\\d+)\" height=\"(?<height>\\d+)\"")
imageMatches = imageRegex.Matches(imageResults)
for imageMatch as Match in imageMatches:
coverart.AddThumb(imageMatch.Groups["url"].Value, releaseName, Int32.Parse(imageMatch.Groups["width"].Value), Int32.Parse(imageMatch.Groups["height"].Value), imageMatch.Groups["url"].Value)

static def GetResult(param):
return param
Title: CoverDownloader
Post by: Tich on 2006-10-07 11:09:12
for me, trying to compile the discogs.boo script creates the following errors:

Code: [Select]
Error: C:\Programme\foobar2000\coverdownloader\scripts\discogs.boo(8,1) - expecting "INDENT", found 'static'.
Error: C:\Programme\foobar2000\coverdownloader\scripts\discogs.boo(9,1) - Unexpected token: get.
Error: C:\Programme\foobar2000\coverdownloader\scripts\discogs.boo(9,4) - expecting "INDENT", found ':'.
Error: C:\Programme\foobar2000\coverdownloader\scripts\discogs.boo(10,7) - Unexpected token: <EOL>.
Error: C:\Programme\foobar2000\coverdownloader\scripts\discogs.boo(11,1) - Unexpected token: get.
Error: C:\Programme\foobar2000\coverdownloader\scripts\discogs.boo(11,4) - expecting "INDENT", found ':'.
Error: C:\Programme\foobar2000\coverdownloader\scripts\discogs.boo(12,7) - Unexpected token: <EOL>.
Error: C:\Programme\foobar2000\coverdownloader\scripts\discogs.boo(13,1) - expecting "INDENT", found 'query'.
Error: C:\Programme\foobar2000\coverdownloader\scripts\discogs.boo(22,38) - Unexpected token: :.
Error: C:\Programme\foobar2000\coverdownloader\scripts\discogs.boo(24,19) - expecting "DEDENT", found '<EOL>'.
Error: C:\Programme\foobar2000\coverdownloader\scripts\discogs.boo(25,1) - expecting "DEDENT", found 'for'.
Error: C:\Programme\foobar2000\coverdownloader\scripts\discogs.boo(25,50) - Unexpected token: :.
Error: C:\Programme\foobar2000\coverdownloader\scripts\discogs.boo(34,40) - Unexpected token: :.
Error: C:\Programme\foobar2000\coverdownloader\scripts\discogs.boo(35,9) - expecting "EOF", found '<EOL>'.
Error: Failed.
Title: CoverDownloader
Post by: AlexVallat on 2006-10-07 18:46:04
for me, trying to compile the discogs.boo script creates the following errors:


Strange, perhaps it is an artefact of being pasted into the codebox.

Try a direct download here discogs.boo (http://www.byalexv.co.uk/temp/discogs.boo)
Title: CoverDownloader
Post by: Chaser on 2006-10-07 19:32:34
Do both of you have the latest version?
PS: I haven't tried the script.
Title: CoverDownloader
Post by: Tomacco_Boy on 2006-10-07 22:45:45
Working fine so far, nice work AlexVallat.
Title: CoverDownloader
Post by: david_dl on 2006-10-08 00:04:54
Do both of you have the latest version?
PS: I haven't tried the script.


The problem is the codebox. Boo and all python-like languages depend on the indentation instead of curly brackets. While it appears correctly in the codebox, the browser manages to mess it up when you copy and paste.
Title: CoverDownloader
Post by: Andrea on 2006-10-16 18:12:38
I'm getting a parameter is not valid in the iTunes store :/


(http://img168.imageshack.us/img168/9163/parameternn4.jpg)
Title: CoverDownloader
Post by: DeuS on 2006-10-19 13:52:06
this program used to work fine...
but now i'm only getting an error message...
"Unable To Connect To The Remote Server"

(http://img228.imageshack.us/img228/9863/newbitmapimageeu3.th.jpg) (http://img228.imageshack.us/my.php?image=newbitmapimageeu3.jpg)

does anyone know what to do?
Title: CoverDownloader
Post by: musosticky on 2006-10-19 13:53:39
I'm getting a parameter is not valid in the iTunes store :/


(http://img168.imageshack.us/img168/9163/parameternn4.jpg)


seconded
Title: CoverDownloader
Post by: krazy on 2006-10-19 13:55:57
seconded

Same here, but it only seems to happen sometimes.. ?
Title: CoverDownloader
Post by: musosticky on 2006-10-19 14:05:35
I dont use it all that much but the last few times ive used it ive had that message
Title: CoverDownloader
Post by: mobyduck on 2006-10-19 14:34:08
I'm getting a parameter is not valid in the iTunes store :/
Me too, but not always: sometimes it works.

Alessandro

[Edit]And sometimes it hogs my CPU and I have to stop it with task manager
Title: CoverDownloader
Post by: mobyduck on 2006-10-24 15:37:48
I have found some (fairly good, IMHO) cover images on this site: http://www.coverisland.net/ (http://www.coverisland.net/).

For example, this (http://www.coverisland.net/copertine/Audio/b.asp) is the page listing all B artists.

Can someone setup a script for this source?

TIA.

Alessandro
Title: CoverDownloader
Post by: alphaex32 on 2006-10-24 15:54:48
Is there a way to set the default directory and filename to folder.jpg in the directory of the selected track?
Title: CoverDownloader
Post by: AlexVallat on 2006-10-24 20:06:49
I have found some (fairly good, IMHO) cover images on this site: http://www.coverisland.net/ (http://www.coverisland.net/).

For example, this (http://www.coverisland.net/copertine/Audio/b.asp) is the page listing all B artists.

Can someone setup a script for this source?

TIA.

Alessandro


I had some time to spare, and this one looked like a bit of a challenge as their search results did not actually link to the results.

Anyway, here's a script for CoverIsland (http://www.byalexv.co.uk/temp/coverisland.boo). I found that site a bit slow, but perhaps your mileage may vary.

Alex
Title: CoverDownloader
Post by: Yotsuya on 2006-10-24 22:45:50
Is there any way to rearrange the order in which scripts get processed? As far as I can tell the current behavior is to order the sources alphabetically by name which is ok except I dont always want for all the google results to render before itunes, etc. (I am already using multiple threads but that doesnt seem to make much difference)
Title: CoverDownloader
Post by: Tich on 2006-10-26 23:41:24
Is there any way to rearrange the order in which scripts get processed? As far as I can tell the current behavior is to order the sources alphabetically by name which is ok except I dont always want for all the google results to render before itunes, etc. (I am already using multiple threads but that doesnt seem to make much difference)


I think you could just prefix the .boo files with numbers matching your preferenced view order. Afaik the order is derived from the filenames and not the script names. Could be wrong though, but i guess its worth a shot.
Title: CoverDownloader
Post by: musosticky on 2006-10-27 00:57:46
any chance of a revision on the Itunes script? they must have changed something to make it fail
Title: CoverDownloader
Post by: david_dl on 2006-10-27 01:17:38
any chance of a revision on the Itunes script? they must have changed something to make it fail


Unfortunately I can't do anything about it, someone overseas has to work out what's changed by using a packet sniffer to watch iTunes download art; I can't do it because iTMS isn't available in New Zealand.
Title: CoverDownloader
Post by: dano on 2006-10-27 01:19:25
any chance of a revision on the Itunes script? they must have changed something to make it fail

Never images are encrypted:
http://marv.kordix.com/archives/000927.html (http://marv.kordix.com/archives/000927.html)
Title: CoverDownloader
Post by: musosticky on 2006-10-27 02:40:20
Ah well it was nice while it lasted
Title: CoverDownloader
Post by: david_dl on 2006-10-27 02:53:26
According to that page the encryption should be easily broken, as the encrypted file is the same for every iTunes user. Therefore the decryption routines must already be in the iTunes software, and could potentially be reverse engineered. We just have to wait and see if anyone wants iTMS art so badly .

Another way of getting it could be to create a dummy MP3, tag it with the album/artist we want to find art for and add it to the iTunes library using the iTunes COM api. iTunes would then immediately download the art for it, and store this in the ID3 tag, which the script could then extract.
However this would only work for people with an iTMS account, and these people probably aren't so bothered with it because they could just let iTunes tag their albums with art the way apple intended.

As i've said before, I can't get an account and therefore cannot test anything like this. However it is not beyond the capabilities of the current version of CoverDownloader's scripting system.
Title: CoverDownloader
Post by: mobyduck on 2006-10-27 10:38:32
I had some time to spare, and this one looked like a bit of a challenge as their search results did not actually link to the results.

Anyway, here's a script for CoverIsland (http://www.byalexv.co.uk/temp/coverisland.boo). I found that site a bit slow, but perhaps your mileage may vary.
Thank you very much for your time. And you are right, it is indeed slow (often timeouts): let's hope they buy a new server soon.

Alessandro
Title: CoverDownloader
Post by: pepoluan on 2006-10-27 12:17:54
I had some time to spare, and this one looked like a bit of a challenge as their search results did not actually link to the results.

Anyway, here's a script for CoverIsland (http://www.byalexv.co.uk/temp/coverisland.boo). I found that site a bit slow, but perhaps your mileage may vary.
Thank you very much for your time. And you are right, it is indeed slow (often timeouts): let's hope they buy a new server soon.

Alessandro
Gee... 768x768 coverarts! Wow!

Except that some coverarts are a bit washed, need some increase in contrast...

But thanks for the site!
Title: CoverDownloader
Post by: Scidd0w on 2006-11-13 16:58:07
It seems in my setup Google is not working anymore.
Does anybody else have the same problem? And does someone maybe have a solution?
Also Itunes is working from time to time?!?
Title: CoverDownloader
Post by: Melomane on 2006-11-14 02:46:10
It seems in my setup Google is not working anymore.
Does anybody else have the same problem? And does someone maybe have a solution?
Also Itunes is working from time to time?!?


google not work here too.
Title: CoverDownloader
Post by: Naveb on 2006-11-14 06:27:19
hello

"C:\Program Files\foobar2000\Coverdownloader\albumart.exe" "$ascii($if($meta(album artist),,%artist%))" "$ascii(%album%)" "$replace(%_path%,%_filename_ext%,)cover.jpg"

that is the code i got from here to use from foo_run. it searches very nicely but i dont know how to save the file. it has the right directory in the output:save directory, but when i choose my picture and click on the save icon it pops up with a window showing "my documents." how do i get it to save where the code tells it to go?

this a great program. my art is normally inside the actual mp3 file when i tag with godfather but i dont know anything that supports this type of thing. this prorgam helps out with the folder stuff.

thanks
Title: CoverDownloader
Post by: david_dl on 2006-11-14 08:38:13
hello

"C:\Program Files\foobar2000\Coverdownloader\albumart.exe" "$ascii($if($meta(album artist),,%artist%))" "$ascii(%album%)" "$replace(%_path%,%_filename_ext%,)cover.jpg"

that is the code i got from here to use from foo_run. it searches very nicely but i dont know how to save the file. it has the right directory in the output:save directory, but when i choose my picture and click on the save icon it pops up with a window showing "my documents." how do i get it to save where the code tells it to go?


Just double click the image you want to save. Middle click to preview, you can also double click on the preview as another way of saving it.

To the other people: I didn't write the google script and don't have time to investigate right now, someone else might.
Title: CoverDownloader
Post by: IngoG on 2006-11-17 15:11:05
It seems in my setup Google is not working anymore.
Does anybody else have the same problem? And does someone maybe have a solution?
Also Itunes is working from time to time?!?


Perhaps this could be the answer ... It works fine for me in Germany. Doesn´t know whats with other countries. It was only changing some Adresses.

Code: [Select]
namespace CoverSources
import System.Xml
import System.Drawing
import System.Text.RegularExpressions
import util

class DEGoogleImage:
        static def GetPageSecret(url as string):
                request as System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url)
                request.UserAgent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)"
                response = request.GetResponse()
                return response.GetResponseStream()
        static SourceName as string:
                get: return "GoogleImage Germany"
        static SourceVersion as decimal:
                get: return 0.1
        static def GetThumbs(coverart,artist,album):
                query = "+"+artist+" +"+album
                params = EncodeUrl(query)
                params.Replace('%20','+')
                textstream = GetPageSecret("http://images.google.de/images?as_q="+params)
                text = System.IO.StreamReader(textstream).ReadToEnd()
                r = Regex("""dyn\.Img\("([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)""")
                iterator = r.Matches(text)
                coverart.SetCountEstimate(iterator.Count)
                for result as Match in iterator:
                        name = result.Groups[10].Value
                        name = name.Remove(name.IndexOf("Pixel"))
                        coverart.AddThumb("http://images.google.de/images?q=tbn:"+result.Groups[3].Value+result.Groups[4].Value,name,0,0,result.Groups[4].Value)
        static def GetResult(param):
                return param
Title: CoverDownloader
Post by: tomthomson on 2006-11-17 19:37:37
thanks @IngoG

its working fine for me, too. Well, I'm also from Germany but that shouldnt make a difference
Title: CoverDownloader
Post by: wolfsong on 2006-11-17 19:48:16
Everytime I try to use the latest version the .NET debugger pops up with "System.IO.DirectoryNotFoundException".
Title: CoverDownloader
Post by: IngoG on 2006-11-17 23:11:35
thanks @IngoG

its working fine for me, too. Well, I'm also from Germany but that shouldnt make a difference


Just FYI : As i played with my moddified script i realize that it throws out to much Images. Because i don´t like small Images i build in a filter. If you wan´t also to do this follow this.

Code: [Select]
Find this line -> name = name.Remove(name.IndexOf("Pixel"))

Insert the next 2 lines

FirstVal = name.Remove(name.IndexOf(" "))
if int.Parse(FirstVal) > 200:

Just for checking. The next line must be : -> coverart.AddThumb("http://images.google.de/images?q=tbn:"+result.Groups[3].Value+result.Groups[4].Value,name,0,0,result.Groups[4].Value)
Title: CoverDownloader
Post by: Scidd0w on 2006-11-19 21:03:05
It seems in my setup Google is not working anymore.
Does anybody else have the same problem? And does someone maybe have a solution?
Also Itunes is working from time to time?!?

Perhaps this could be the answer ... It works fine for me in Germany. Doesn´t know whats with other countries. It was only changing some Adresses.

Code: [Select]
namespace CoverSources
...
Thank you for making the script. Unfortunately I could not get it to work.
When I add the script the program give the following error report:
Code: [Select]
Searching for scripts...
Found 7 files, [0 - itunes.boo, 1 - amazon.boo, 2 - google.boo, 3 - walmart.boo, 4 - coverparadies.boo, 5 - coverisland.boo, util.boo]...
Loading references; [ICSharpCode.SharpZipLib.dll, System.Windows.Forms, System.Web, System.Windows.Forms, System.Web]...
Compiling...
Error: C:\Program Files\foobar2000\utilities\coverdownloader\scripts\2 - google.boo(1,2) - unexpected char: 0xBB.
Error: Failed.
Any idea whats wrong?

<update>
I found out that the  in front of namespace was the thing that was wrong. After removing them it worked.
But I know have a new problem, when I add the two new lines you explain in the post above this. When I add them the program outputs the following error report.
Code: [Select]
Error: C:\Program Files\foobar2000\utilities\coverdownloader\scripts\2 - google.boo(29,57) - Unexpected token: <INDENT>.
Error: C:\Program Files\foobar2000\utilities\coverdownloader\scripts\2 - google.boo(29,49) - Unexpected token: FirstVal.
Error: C:\Program Files\foobar2000\utilities\coverdownloader\scripts\2 - google.boo(30,77) - Unexpected token: :.
Error: C:\Program Files\foobar2000\utilities\coverdownloader\scripts\2 - google.boo(31,33) - Unexpected token: <EOL>.
Error: C:\Program Files\foobar2000\utilities\coverdownloader\scripts\2 - google.boo(33,29) - Unexpected token: <DEDENT>.
Error: Failed.
Somebody knows how to solve this?
Title: CoverDownloader
Post by: wolfsong on 2006-11-19 22:46:55
I was able to get it working from the REACT 2 install at home but I'm wondering is there a way to bring back the image size that was displayed in the older versions?

@david_dl: Please fix your foo_run command line in the first post as it gives the wrong executable. Thanks.
Title: CoverDownloader
Post by: freebits on 2006-11-20 14:08:09
Hello, 

Are there anybody who is interested in working on international(Korean) music cover site?

I'd worked on www.yes24.com using regex to use it xlobby htpc frontend but, these days it doesn't work any more.

here's some information regarding the site.

yes24 is famous online shopping mall similar to Amazon in Korea.
url : http://www.yes24.com/searchCenter/searchRe...9%DD&query= (http://www.yes24.com/searchCenter/searchResult.aspx?keywordAd=&qdomain=%C0%BD%B9%DD&query=)
test word to enter in the search tab : big mama (one of the famus female vocal group). You can add the word at the end of above url and search for it.

The first result when you enter 'big mama' will show you purple coverart. And I want the large one which is shown when I clicked the small picture.


One more question.
Do you have any plans to improve your program to search movie posters, too? I also had difficulies in obtaining some movie posters. This covers are necessary item to run a HTPC frontend.

Thanks,
Freebits
Title: CoverDownloader
Post by: AlexVallat on 2006-11-20 21:46:47
Meh, it's another slow site, at least for me. Perhaps it is faster from Korea.

Anyway, here's the script for it: yes24.boo (http://www.byalexv.co.uk/temp/yes24.boo)

Enjoy!
Title: CoverDownloader
Post by: IngoG on 2006-11-21 08:22:27
....
<update>
I found out that the  in front of namespace was the thing that was wrong. After removing them it worked.
But I know have a new problem, when I add the two new lines you explain in the post above this. When I add them the program outputs the following error report.
Code: [Select]
Error: C:\Program Files\foobar2000\utilities\coverdownloader\scripts\2 - google.boo(29,57) - Unexpected token: <INDENT>.
Error: C:\Program Files\foobar2000\utilities\coverdownloader\scripts\2 - google.boo(29,49) - Unexpected token: FirstVal.
Error: C:\Program Files\foobar2000\utilities\coverdownloader\scripts\2 - google.boo(30,77) - Unexpected token: :.
Error: C:\Program Files\foobar2000\utilities\coverdownloader\scripts\2 - google.boo(31,33) - Unexpected token: <EOL>.
Error: C:\Program Files\foobar2000\utilities\coverdownloader\scripts\2 - google.boo(33,29) - Unexpected token: <DEDENT>.
Error: Failed.
Somebody knows how to solve this?

I thik this is a country-specific Problem. Perhaps the return from other sites than germany differs. You have to check the returned HTML-Page.  I worked it out with a tool mentioned earlier in this Post called "Expresso". With this tool you can test Regular Expressions.

Regards

IngoG

I was able to get it working from the REACT 2 install at home but I'm wondering is there a way to bring back the image size that was displayed in the older versions?

@david_dl: Please fix your foo_run command line in the first post as it gives the wrong executable. Thanks.

What do you mean with bringing back the image size. The older Versions are unknown for me. In the actual Version there isn´t a Image Size. A way to show it is to edit the script. Google for example delivers the Image Size in the returned HTML so you can implement it via the script.

Code: [Select]
                        name = result.Groups[10].Value
                        name = name.Remove(name.IndexOf("Pixel"))

I also checked the sourcecode for implementing this feature, but it didn´t worked the way i want !

Regards

IngoG
Title: CoverDownloader
Post by: freebits on 2006-11-21 13:43:19
Meh, it's another slow site, at least for me. Perhaps it is faster from Korea.

Anyway, here's the script for it: yes24.boo (http://www.byalexv.co.uk/temp/yes24.boo)

Enjoy!


oh!! You are the man!!!!

Thanks alot, AlexVallat.

Can you examine your script more if it support unicode, ie. inputting Korean?

It successfully retrieves all the English album name, etc. but, it can't find any Korean artist name, titles at all.

Is this the limitation of coverdownloader or is it only script issue?

Thanks in advance,

Freebits
Title: CoverDownloader
Post by: Melomane on 2006-11-22 00:35:16
thanks @IngoG

its working fine for me, too. Well, I'm also from Germany but that shouldnt make a difference


work also in france!
thanks @IngoG
Title: CoverDownloader
Post by: wolfsong on 2006-11-22 04:24:25
What do you mean with bringing back the image size. The older Versions are unknown for me. In the actual Version there isn´t a Image Size. A way to show it is to edit the script. Google for example delivers the Image Size in the returned HTML so you can implement it via the script.

Code: [Select]
                        name = result.Groups[10].Value
                        name = name.Remove(name.IndexOf("Pixel"))


I also checked the sourcecode for implementing this feature, but it didn´t worked the way i want !

Regards

IngoG

If you look at the download for REACT 1, that version showed the image size (usually 500x500) at the bottom of each image. This is pretty useful when looking at images from several sources to determine which size is best.
Title: CoverDownloader
Post by: IngoG on 2006-11-23 15:30:53
Quote
If you look at the download for REACT 1, that version showed the image size (usually 500x500) at the bottom of each image. This is pretty useful when looking at images from several sources to determine which size is best.


The Problem with the Coversizes is, that you only know the size of the cover when you make a preview. That would slow down the process if you have a lot of covers to search. When you look at my googlescript for germany than you will see that it prints the size below the images out of the script. This is possible because Google delivers the size in the returned HTML. So you only have to change the script for getting the sizes.

IngoG
Title: CoverDownloader
Post by: Yamou on 2006-11-23 23:16:06
Have you tried a script for CDUniverse. I often return 450x450 jpg album art when doing a run from foobar with the following code:

http://www.cduniverse.com/sresult.asp?HT_S...replace(%album% (http://www.cduniverse.com/sresult.asp?HT_Search_Info=$replace(%album%), ,+)&x=0&y=0&opt1=2&sourceid="Mozilla-search"

I don't know if this would work, but it would be nice if there was a boo script for this website.

Thanks
yamou

New Version (Experimental):
Here's a new version I've been working on. For this you'll require .NET framework 2.0 installed.

Please report any bugs/glitches.

Latest version (Supports iTMS)
Download: [attachment=2550:attachment]
Source (GPL): [attachment=2548:attachment]

If you create anything useful with the source, it would be a good idea to upload it here for everyone to benefit. Note that I probably won't be updating this project again, except maybe to add scripts.
The license requires that you include full sourcecode with any modified version distributed.
It's messy code, and the first and only time I've used C#, so I hope it's of use to someone.

Included site scripts:
  • Walmart.com
  • Buy.com
  • Amazon.com
  • RateYourMusic.com
  • iTunes Music Store
Screenshot:
(http://img106.imageshack.us/img106/163/monitorcapture10june2006143052.th.png) (http://img106.imageshack.us/img106/163/monitorcapture10june2006143052.png)

---------Old Version-----------

This version uses Python scripts to specify sources for cover art. Look in the CoverSources\Scripts folder for more details. Walmart.py is a good template if you wish to write your own (Amazon.py is a mess)

The commandline syntax is quite simple, just coverart.exe <Artist> <Album> <File to save to>
The second two parameters are optional, if a path is not specified it will prompt you with a Save As dialog.

You shouldn't require any VC8 runtimes; it's linked statically.

Extract the entire archive into one folder, there is no need to unzip or do anything with Python24.zip, this is the library for the built-in interpreter and can be read from the zip file.

Note: The scripts in this download file are NOT up to date. Use the scripts attached to this post. Put them in coversources\scripts
Download links:
Download here (http://www.hydrogenaudio.org/forums/index.php?act=Attach&type=post&id=2227)
Download source here (http://www.hydrogenaudio.org/forums/index.php?act=Attach&type=post&id=2228)

Updated Scripts for Rate Your Music and Amazon are attached (these are recommended over the ones included in the download archive, for example the Amazon script no longer returns results that don't have valid thumbnails)

Commandline for foo_run:
Code: [Select]
"C:\Program Files\foobar2000\coverart\coverart.exe" "%artist%" "%album%" "$replace(%_path%,%_filename_ext%,)folder.jpg"

Screenshot:

(http://daviddl.orcon.net.nz/coverthumb7.PNG) (http://daviddl.orcon.net.nz/coverart7.PNG)[/s]
Title: CoverDownloader
Post by: wolfsong on 2006-11-28 17:18:05
I'm getting a lot of 1x1 pixel images (I think from Amazon) even though a larger image is displayed in the results. For example, Garth Brooks - The Hits. The Amazon US has one image and the German site has 2 but only one previews "correctly. Does anyone know how to fix this?
Title: CoverDownloader
Post by: hal9001 on 2006-12-01 12:52:03
I've been trying to figure out the 1st post to see where the newest version is, but couldn't figure it out.
Could you possibly clean out the extra download links and deleted info about prev. versions, and just leace the newest download version?

(I'm using the version from September 23.
Title: CoverDownloader
Post by: wolfsong on 2006-12-01 14:34:14
I've been trying to figure out the 1st post to see where the newest version is, but couldn't figure it out.
Could you possibly clean out the extra download links and deleted info about prev. versions, and just leace the newest download version?

(I'm using the version from September 23.

That post could use a bit of clean up. In the meantime, the dowload is the 5th line in the post.
Title: CoverDownloader
Post by: adrianmak on 2006-12-07 09:41:38
is it possible to add self-script for other websites
Title: CoverDownloader
Post by: fooruncle on 2006-12-17 10:18:17
hi,

just two questions about this amazing piece of software. i scanned the thread completely, but i didn't find the answers.

1) maybe i'm too stupid, but i never get the preview screen that gives you the resolution of pics (like in the screenshot in the first post). all i can see is the browser / queue / cover window... (EDIT: in older versions only, maybe the screenshot could be updated?)

2) what is the browser window for? when i hit the refresh button, all i get is an error message (see attachment). (EDIT: foo_comserver needed EDIT2: installed, still the same problem)

thanks for your help!

fooruncle
Title: CoverDownloader
Post by: mazy on 2006-12-17 16:54:59
browser lets you browse your albums (i.e. albums in your foobar's database), indicate which have missing covers and then search covers for them (= put in the queue). you can select just albums you wish or all without album art (folder.jpg).
Title: CoverDownloader
Post by: fooruncle on 2006-12-17 16:57:56
browser lets you browse your albums (i.e. albums in your foobar's database), indicate which have missing covers and then search covers for them (= put in the queue). you can select just albums you wish or all without album art (folder.jpg).


thanks for the information!
can anyone help me with the problem described to posts above?


frncle
Title: CoverDownloader
Post by: Jarn on 2006-12-27 16:14:16
I have a problem. After I'm done with CoverDownloader and I try to close it, it takes a REALLY long time to close while it says "Waiting for threads..." in the status bar.

EDIT: Could someone please make a script for http://www.coveralia.com/ (http://www.coveralia.com/) ? It seems like they have some good covers.
Title: CoverDownloader
Post by: AlexVallat on 2006-12-28 10:40:07
Alex the scripter strikes again!

Coveralia.boo (http://www.byalexv.co.uk/foobar/coveralia.boo)

Seems like a good site, this one, nice and fast, high res covers, and handy small thumbnails.

Alex
Title: CoverDownloader
Post by: Sphix on 2006-12-30 16:41:43
How do I use it with foobar2000 (current album) or I need to type artist/album?
The one in the first post is the latest version?

Thx in adv.
Title: CoverDownloader
Post by: steliyan on 2006-12-30 16:53:10
You need foo_run, this is the code for it:
Code: [Select]
"D:\Installed\foobar2000\coverart\albumart.exe" "%artist%" "%album%" "$replace(%_path%,%_filename_ext%,)cover.jpg"

*Note: change the dir, else it will give you error.
Title: CoverDownloader
Post by: Sphix on 2006-12-30 17:02:24
Thanks dude
Title: CoverDownloader
Post by: fooruncle on 2006-12-30 18:38:03
@alexvallat:
in your script, 'class discogs' has to be changed to 'class coveralia', otherwise it will fail to compile for those who use the discogs-script as well.

thank you very much for the script, the images high quality!

frncl
Title: CoverDownloader
Post by: cartman(2vd) on 2006-12-30 19:35:27
im wondering if someone manage to do amazon.jp script... i can find almost any cover art with current set of script but anime soundtrack always kinda fail
Title: CoverDownloader
Post by: AlexVallat on 2006-12-30 19:36:28
@alexvallat:
in your script, 'class discogs' has to be changed to 'class coveralia', otherwise it will fail to compile for those who use the discogs-script as well.

thank you very much for the script, the images high quality!

frncl


Oops, sorry. I always tend to do a new script by modifying a copy of one of my old ones, and I must have missed changing this bit.



Thanks for pointing it out, I've corrected it in the file for download now.
Title: CoverDownloader
Post by: Sphix on 2006-12-31 16:24:03
Google and iTunesMS not working 

Anyone could make a cduniverse.com script maybe?

(it's hard to find metal albums at high res =( )


EDIT: iTunesMS works sometimes
Title: CoverDownloader
Post by: kockroach on 2006-12-31 16:35:19
Deleted my post.  I was looking at the wrong cover downloader.  Sorry.
Title: CoverDownloader
Post by: AlexVallat on 2007-01-01 13:22:18
Anyone could make a cduniverse.com script maybe?

Here you go: cduniverse.boo (http://www.byalexv.co.uk/foobar/cduniverse.boo)

Searching CD Universe is not great, it won't let you search for both artist and album at the same time. This script searches by album title, then filters out any of the results which don't match the specified artist (case-insensitive substring match). So make sure you fill in the Album field, or it won't work.

Also, I didn't bother with thumbnails here as they would mean an extra page to parse, and they aren't that much smaller anyway.

Alex
Title: CoverDownloader
Post by: kockroach on 2007-01-02 01:48:39
Unlike my previous post (a couple above), I am meaning to post in this thread now.  I really like this program, thanks david_dl for providing it to us!  Like Sphix mentioned, the Google script doesn't seem to be working now.  I am not familiar with the scripts, so I do not know what would need changing to make it work again.  Has anyone been able to make a change and it a Google script working again?  If so, I would appreciate getting a copy.

Thanks!

UPDATE:

Amazing what you can figure out, once you know where/what to look at.  I have made changes to the Google script, and I have gotten it to work on my end.  I hope it works for all of you!  When you paste this code into a text file, replace the spaces before the code with an appropriate number of "Tabs" resulting in the same width of space.  Save the text file with a .boo extension.

Code: [Select]
namespace CoverSources
import System.Xml
import System.Drawing
import System.Text.RegularExpressions
import util

class GoogleImage:
static def GetPageSecret(url as string):
request as System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url)
request.UserAgent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)"
response = request.GetResponse()
return response.GetResponseStream()
static SourceName as string:
get: return "GoogleImage"
static SourceVersion as decimal:
get: return 0.2
static def GetThumbs(coverart,artist,album):
query = artist+" "+album
params = EncodeUrl(query)
params.Replace('%20','+')
textstream = GetPageSecret("http://images.google.com/images?q="+params)
text = System.IO.StreamReader(textstream).ReadToEnd()
r = Regex("""dyn\.Img\("([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)"\)""")
iterator = r.Matches(text)
coverart.SetCountEstimate(iterator.Count)
for result as Match in iterator:
name=(result.Groups[7].Value.Replace("<b>","").Replace("</b>",""))
coverart.AddThumb("http://images.google.com/images?q=tbn:"+result.Groups[3].Value+result.Groups[4].Value,name,0,0,result.Groups[4].Value)
static def GetResult(param):
return param

Edit: Added note about tabs and saving.
Title: CoverDownloader
Post by: JadeElephant on 2007-01-02 09:12:41
I found a great site for looking up cover art. Can anyone make a script for it?

http://www.slothradio.com/covers/index.php (http://www.slothradio.com/covers/index.php)

Edit - OK, I understand where I need to put the scripts, but how the hell do I take the copied text and turn into the necessary file?

Edit again- OK, I kinda figured it out. Open the .boo files with a text editor, paste the code, save. I haven't been able to pull up any results with Coveralia yet though. And thanks kockroach, but that didn't work for me. Might have something to do with the placement of the spaces.
Title: CoverDownloader
Post by: fooruncle on 2007-01-02 11:47:50
I found a great site for looking up cover art. Can anyone make a script for it?

http://www.slothradio.com/covers/index.php (http://www.slothradio.com/covers/index.php)

Edit - OK, I understand where I need to put the scripts, but how the hell do I take the copied text and turn into the necessary file?

Edit again- OK, I kinda figured it out. Open the .boo files with a text editor, paste the code, save. I haven't been able to pull up any results with Coveralia yet though. And thanks kockroach, but that didn't work for me. Might have something to do with the placement of the spaces.


hmmm, they obviously don't have their own image database, but use amazon's pics. so it wouldn't make much sense to write a script since we already have some for amazon us and amazon de. i checked only three examples, though.

frncl
Title: CoverDownloader
Post by: kockroach on 2007-01-02 13:26:37
And thanks kockroach, but that didn't work for me. Might have something to do with the placement of the spaces.

Earlier in the thread it was mentioned that the copy/paste function doesn't work correctly.  All of the space before the code on each line are tabs, not spaces (using the spacebar).  You will need to replace those yourself.
Title: CoverDownloader
Post by: mazy on 2007-01-02 13:33:07
Earlier in the thread it was mentioned that the copy/paste function doesn't work correctly.  All of the space before the code on each line are tabs, not spaces (using the spacebar).  You will need to replace those yourself.

or you can 'reply' to the post containing the code box and copy the code listing from the edit window.
Title: CoverDownloader
Post by: kockroach on 2007-01-02 14:26:52
I made a change to the Google Script so that it would display the Image Size below the thumbnail, instead of the artist/title.  I also added the ability to filter out images smaller than a certain width.  I didn't want to overwrite the one I posted earlier as there are some who may prefer one over the other.

Dont' forget to replace the spaces before the code with an appropriate number of "Tabs" resulting in the same width of space. Save the text file with a .boo extension.

Code: [Select]
namespace CoverSources
import System.Xml
import System.Drawing
import System.Text.RegularExpressions
import util

class GoogleImage:
static def GetPageSecret(url as string):
request as System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url)
request.UserAgent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)"
response = request.GetResponse()
return response.GetResponseStream()
static SourceName as string:
get: return "GoogleImage"
static SourceVersion as decimal:
get: return 0.2
static def GetThumbs(coverart,artist,album):
query = artist+" "+album
params = EncodeUrl(query)
params.Replace('%20','+')
textstream = GetPageSecret("http://images.google.com/images?q="+params)
text = System.IO.StreamReader(textstream).ReadToEnd()
r = Regex("""dyn\.Img\("([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)"\)""")
iterator = r.Matches(text)
coverart.SetCountEstimate(iterator.Count)
for result as Match in iterator:
name = result.Groups[10].Value
name = name.Remove(name.IndexOf("pixels"))
FirstVal = name.Remove(name.IndexOf(" x "))
if (int.Parse(FirstVal) >= 300):
coverart.AddThumb("http://images.google.com/images?q=tbn:"+result.Groups[3].Value+result.Groups[4].Value,name,0,0,result.Groups[4].Value)
static def GetResult(param):
return param
To adjust the size used in the filter, change the number in the following line to whatever you want:
Code: [Select]
if (int.Parse(FirstVal) >= 300):

Also, I know this won't work with the German Google site, unless you change "pixels" to "Pixel".
Title: CoverDownloader
Post by: JadeElephant on 2007-01-03 01:13:54
Thanks mazy and kockroach, got it working perfectly. Your Google script is great, by the way. The dimensions of the art should be displayed like that by default, in my opinion.
Title: CoverDownloader
Post by: kockroach on 2007-01-03 01:17:51
Thanks mazy and kockroach, got it working perfectly. Your Google script is great, by the way. The dimensions of the art should be displayed like that by default, in my opinion.

Glad to hear that it is working for you.  I wish I could say that I knew exactly what I was doing when it comes to scripting...it was a bunch of trial and error for me 

I have been trying to get the buy.com script to work, but I can't get anything to work.  Has anyone been able to get it working?
Title: CoverDownloader
Post by: wraithdu on 2007-01-03 14:17:46
Awesome job kockroach.  If you have some time, could you explain what the relevant lines of code are in your google script to display the image size instead of the name?  I'd like to learn a little more about it, and try to modify the other scripts for Amazon and Walmart to do the same.  (Or if you'd like to do that as well....)

Either way, what is that scripting language so I can do some research on it?  Thanks everyone!
Title: CoverDownloader
Post by: kockroach on 2007-01-03 14:41:23
Awesome job kockroach.  If you have some time, could you explain what the relevant lines of code are in your google script to display the image size instead of the name?  I'd like to learn a little more about it, and try to modify the other scripts for Amazon and Walmart to do the same.  (Or if you'd like to do that as well....)

Either way, what is that scripting language so I can do some research on it?  Thanks everyone!

wraithdu,

As I mentioned, I have no experience whatsoever with scripting language....so I couldn't even tell you what language is used.  I recall seeing david_dl mention using IronPython...not sure if this is Python based or not.  I did the changes by looking at the previous google code, things that InogG provided, and the actual HTML source page of a search in Google.  By looking at all of this, you can figure out what is going on, but I can't expand on what is being done since I don't know the language.

This is the section that gives the name
Code: [Select]
name = result.Groups[10].Value
name = name.Remove(name.IndexOf("pixels"))
FirstVal = name.Remove(name.IndexOf(" x "))
if (int.Parse(FirstVal) >= 300):

The first line in the above code pulls out a section of HTML source code that shows size info, in the format of "500 x 500 pixels - 32k".  The second line ignores anything from "pixels" on, so it only displays "500 x 500" in the program.  The filter is set up by lines 3 and 4.  The third line tells the filter to look at only the first value in the "500 x 500" by removing anything from the " x " on.  The final line tells the filter what to keep...in this case anything 300 pixels wide or above.

The Amazon script is looking at an XML page, so I am not sure exactly what can be done about getting size info included there.  The source code needs to provide the actual size information to be able to pull it out with a script.
Title: CoverDownloader
Post by: AlexVallat on 2007-01-03 16:48:23
The scripting language is Boo (http://boo.codehaus.org/). It is a .net language, so if you are familiar with C# or VB.net it shouldn't be too tricky to pick up (just syntactical differences).

A while ago I did a modification of the Amazon script to put the image size in the label, or overlayed on the image. It works by downloading the full sized image and measuring it, so you can use that method for any service that does not provide information about the width and height in the html (or xml, whatever).

You can see it here in my [a href='index.php?act=findpost&pid=420417']earlier post[/a].

Alex
Title: CoverDownloader
Post by: fooruncle on 2007-01-03 17:43:10
about two days ago i finally found the solution to my comserver problem. i had simply forgotten to register it... however, i re-installed win xp today, copied back my fb2k-folder (including coverdownloader) and started foobar. no problems. until i started a cover search. i got the following error message: "the application could not be properly initialized. (0x0000135)"... I tried to run in with admin rights, same problem. i downloaded it again and tested it in a new folder. same problem... hmmm, basically, my system is only 'cleaner' than it was before... can anyone help me (again)?

thanks,
frncl
Title: CoverDownloader
Post by: kockroach on 2007-01-04 01:28:15
The scripting language is Boo (http://boo.codehaus.org/). It is a .net language, so if you are familiar with C# or VB.net it shouldn't be too tricky to pick up (just syntactical differences).

A while ago I did a modification of the Amazon script to put the image size in the label, or overlayed on the image. It works by downloading the full sized image and measuring it, so you can use that method for any service that does not provide information about the width and height in the html (or xml, whatever).

You can see it here in my [a href='index.php?act=findpost&pid=420417']earlier post[/a].

Alex

Hi Alex,

Thanks for the info.  I will check out the page on Boo.  Also, thanks for pointing out your modified Amazon script.  I passed over that one, and didn't even realize it.

EDIT: An update on some changes i have made.  I added the size filter to the Amazon script that AlexVallat had posted with the size info put on the thumb as a caption.  I was also successful in adding that same code into the Google script, and then changing the "label" to the title of the image.  Before I post them up, I want to try to do the same bold effect that is present in the Amazon script for correct matches.  Not exactly sure what I need to do, so if there are any suggestions, please throw them my way.

Thanks.
Title: CoverDownloader
Post by: AlexVallat on 2007-01-04 08:01:20
I added the size filter to the Amazon script that AlexVallat had posted...


It is supposed to already be doing size filtering. The line if large.Height>10: filters images smaller than 10px, just to remove the non-album tiny images that sometimes appear, but you can change that value if you need to.

I want to try to do the same bold effect that is present in the Amazon script for correct matches.


This is handled internally by the CoverDownloader app, not the script. If the title matches exactly what is searched for, it is shown in bold (this is an option, though). I suppose if you wanted to make sure that the title was bold you could return the title as just String.Format("{0} {1}", artist, album), but it is probably more generally useful to return the actual title as found from the service you are searching.

Of course, appending a size to the title guarantees it won't be an exact match, which is why I added the option to overlay the size on the thumbnail instead in my script!

Alex
Title: CoverDownloader
Post by: kockroach on 2007-01-04 13:14:42
The line if large.Height>10: filters images smaller than 10px, ...
Ahh...from the look of it, I thought it was only for the thumb images.  Don't know what I was thinking.  Thanks!

This is handled internally by the CoverDownloader app, not the script. If the title matches exactly what is searched for, it is shown in bold (this is an option, though). I suppose if you wanted to make sure that the title was bold you could return the title as just String.Format("{0} {1}", artist, album), but it is probably more generally useful to return the actual title as found from the service you are searching.

Of course, appending a size to the title guarantees it won't be an exact match, which is why I added the option to overlay the size on the thumbnail instead in my script!

Alex
I did not realize that it was actually handled internally.  The titles coming out of the Google search are a mess, of course because the various websites they come from do not clean up the names.  I was hoping to pull out if the name included the album and artist.  Hopefully as a way to remove incorrect results.

Thanks for your help Alex!

EDIT:
Alex, I tested the filter you mentioned in the Amazon script, and it seems to do something different than what I added into the script.  Here is what I have done:
Code: [Select]
namespace CoverSources
import System.Xml
import System.Drawing
import util

class Amazon:
static AddSizeToImage = true //If true, this will add a caption to the top-left of the image with the size.
static AddSizeToLabel = false //If true, this will put the size in the label. Note that this will spoil bold higlighing of exact matches
static ThumbSize = Size(200, 200) //Size here should match thumbnail size in CoverDownloader settings for best results

static SourceName as string:
get: return "Amazon"
static SourceVersion as decimal:
get: return 0.2
static def GetThumbs(coverart,artist,album):
x=System.Xml.XmlDocument()
x.Load("http://xml.amazon.com/onca/xml3?f=xml&t=webservices-20&dev-t=1MV23E34ARMVYMBDZB02&type=lite&page=1&mode=music&KeywordSearch="+EncodeUrl(artist+" "+album))
results=x.GetElementsByTagName("Details")
coverart.SetCountEstimate(results.Count)
for node in results:
large = System.Drawing.Bitmap.FromStream(GetPageStream(node["ImageUrlLarge"].InnerText))
if large.Height>10:
caption = System.String.Format("{0} x {1}", large.Width, large.Height)

//Create the thumbnail.
thumb = Bitmap(large, ThumbSize)
large.Dispose()

//Caption the image
if AddSizeToImage:
g = Graphics.FromImage(thumb)
f = Font(SystemFonts.DefaultFont, FontStyle.Bold)
g.DrawString(caption, f, Brushes.White, 1,1 )
g.DrawString(caption, f, Brushes.Black, 0,0 )
f.Dispose()
g.Dispose()

label = node["ProductName"].InnerText
//Add the size to the label
if AddSizeToLabel:
label = System.String.Format("{0} ({1})", label, caption)

FirstVal = caption.Remove(caption.IndexOf(" x "))
if (int.Parse(FirstVal) >= 300):
coverart.AddThumb(thumb,label,0,0,node["ImageUrlLarge"].InnerText)
static def GetResult(param):
return param
I added the two lines toward the end starting with "FirstVal", which filters the images based on the "{0} x {1}" output of your caption.  Leaving the script as I pasted it, and then searching for "Pearl Jam Ten", for example, I find only 4 results (all show 500 x 500, but one is actually blank--not sure why).  If I remove the lines I added, then there are 10 results (all the same 10 that appear if I do an actual search on Amazon.com).  If I do a search with your filter set to 300, with or without the filter I added set to 300, I still get all 10 results.  The difference is that the caption shows all 10 images as "500 x 500", which is not truly the case.

It seems that if the image.Height doesn't meet the requirement set in the filter, that it will default the image to "500 x 500".  If you open any of the images from the search on Amazon.com in its own window, and then check the properties, it always lists the width and height as 500 x 500, even if the image is truly smaller.
Title: CoverDownloader
Post by: wraithdu on 2007-01-04 13:53:11
Nice work.  Can't wait to see your scripts kockroach.
Title: CoverDownloader
Post by: wraithdu on 2007-01-04 15:46:17
I was feeling left out so I decided to make a small contribution.  I added an image size description to Alex's discogs boo script.  It seems all art from that site is high quality, so I didn't write in an image size filter.  Also I couldn't figure out the fancy image overlay like the Amazon script, so it's just in the title....baby steps.  The discogs script was very different from Amazon, so I couldn't modify the overlay code.

PS - I'm no programmer at all, so each new piece of fb2k that I try out I'm learning the coding from scratch.  So you'll have to forgive my amateur results

Code: [Select]
namespace CoverSources
import System
import System.Text
import System.Text.RegularExpressions
import util

class Discogs:
static SourceName as string:
get: return "Discogs"
static SourceVersion as decimal:
get: return 0.1
static def GetThumbs(coverart,artist,album):
query as string = artist + " " + album
query.Replace(' ','+')
obidResults = GetPage(String.Format("http://www.discogs.com/search?type=all&q={0}", EncodeUrl(query)))

//Get obids
obidRegex = Regex("<a href=\"/release/(?<obid>\\d+)\"><span[^>]+>[^-]+- (?:</?em>|(?<name>[^<-]+))+</span>", RegexOptions.Multiline)
obidMatches = obidRegex.Matches(obidResults)
coverart.SetCountEstimate(obidMatches.Count) //Probably more than this, as some releases might have multiple images

for obidMatch as Match in obidMatches:
//Construct the release name by joining up all the captures of the "name" group
releaseNameBuilder = StringBuilder()
for namePart in obidMatch.Groups["name"].Captures:
releaseNameBuilder.Append(namePart)

releaseName = releaseNameBuilder.ToString()

//Get the image results
imageResults = GetPage(String.Format("http://www.discogs.com/viewimages?what=R&obid={0}&showpending=1", obidMatch.Groups["obid"].Value))
imageRegex = Regex("<img src=\"(?<url>http://www\\.discogs\\.com/image/R-\\d+-\\d+.jpe?g)\" width=\"(?<width>\\d+)\" height=\"(?<height>\\d+)\"")
imageMatches = imageRegex.Matches(imageResults)
for imageMatch as Match in imageMatches:
imgwide = imageMatch.Groups["width"].Value
imghigh = imageMatch.Groups["height"].Value
label = System.String.Format("{0} ({1} x {2})", releaseName, imgwide, imghigh)
coverart.AddThumb(imageMatch.Groups["url"].Value, label, Int32.Parse(imageMatch.Groups["width"].Value), Int32.Parse(imageMatch.Groups["height"].Value), imageMatch.Groups["url"].Value)

static def GetResult(param):
return param


EDIT:

I figured out the image overlay for discogs.  Here's the updated script.

Code: [Select]
namespace CoverSources
import System
import System.Xml
import System.Drawing
import System.Text
import System.Text.RegularExpressions
import util

class Discogs:
static ThumbSize = Size(150, 150)
static SourceName as string:
get: return "Discogs"
static SourceVersion as decimal:
get: return 0.1
static def GetThumbs(coverart,artist,album):
query as string = artist + " " + album
query.Replace(' ','+')
obidResults = GetPage(String.Format("http://www.discogs.com/search?type=all&q={0}", EncodeUrl(query)))

//Get obids
obidRegex = Regex("<a href=\"/release/(?<obid>\\d+)\"><span[^>]+>[^-]+- (?:</?em>|(?<name>[^<-]+))+</span>", RegexOptions.Multiline)
obidMatches = obidRegex.Matches(obidResults)
coverart.SetCountEstimate(obidMatches.Count) //Probably more than this, as some releases might have multiple images

for obidMatch as Match in obidMatches:
//Construct the release name by joining up all the captures of the "name" group
releaseNameBuilder = StringBuilder()
for namePart in obidMatch.Groups["name"].Captures:
releaseNameBuilder.Append(namePart)

releaseName = releaseNameBuilder.ToString()

//Get the image results
imageResults = GetPage(String.Format("http://www.discogs.com/viewimages?what=R&obid={0}&showpending=1", obidMatch.Groups["obid"].Value))
imageRegex = Regex("<img src=\"(?<url>http://www\\.discogs\\.com/image/R-\\d+-\\d+.jpe?g)\" width=\"(?<width>\\d+)\" height=\"(?<height>\\d+)\"")
imageMatches = imageRegex.Matches(imageResults)
for imageMatch as Match in imageMatches:

large = System.Drawing.Bitmap.FromStream(GetPageStream(imageMatch.Groups["url"].Value))
caption = System.String.Format("{0} x {1}", large.Width, large.Height)
thumb = Bitmap(large, ThumbSize)
large.Dispose()

g = Graphics.FromImage(thumb)
f = Font(SystemFonts.DefaultFont, FontStyle.Bold)
g.DrawString(caption, f, Brushes.White, 1,1 )
g.DrawString(caption, f, Brushes.Black, 0,0 )
f.Dispose()
g.Dispose()

coverart.AddThumb(thumb, releaseName, Int32.Parse(imageMatch.Groups["width"].Value), Int32.Parse(imageMatch.Groups["height"].Value), imageMatch.Groups["url"].Value)

static def GetResult(param):
return param
Title: CoverDownloader
Post by: wraithdu on 2007-01-04 16:28:13
And one for google with the image size overlayed on the thumbnail.  Thanks again to Alex and kockroach for the main body of the scripting.

Code: [Select]
namespace CoverSources
import System.Xml
import System.Drawing
import System.Text.RegularExpressions
import util

class GoogleImage:
static ThumbSize = Size(150, 150)
static def GetPageSecret(url as string):
request as System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url)
request.UserAgent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)"
response = request.GetResponse()
return response.GetResponseStream()
static SourceName as string:
get: return "GoogleImage"
static SourceVersion as decimal:
get: return 0.2
static def GetThumbs(coverart,artist,album):
query = artist+" "+album
params = EncodeUrl(query)
params.Replace('%20','+')
textstream = GetPageSecret("http://images.google.com/images?q="+params)
text = System.IO.StreamReader(textstream).ReadToEnd()
r = Regex("""dyn\.Img\("([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)","([^"]*)"\)""")
iterator = r.Matches(text)
coverart.SetCountEstimate(iterator.Count)
for result as Match in iterator:
size = result.Groups[10].Value
size = size.Remove(size.IndexOf("pixels"))

large = System.Drawing.Bitmap.FromStream(GetPageStream("http://images.google.com/images?q=tbn:"+result.Groups[3].Value+result.Groups[4].Value))
thumb = Bitmap(large, ThumbSize)
large.Dispose()

g = Graphics.FromImage(thumb)
f = Font(SystemFonts.DefaultFont, FontStyle.Bold)
g.DrawString(size, f, Brushes.White, 1,1 )
g.DrawString(size, f, Brushes.Black, 0,0 )
f.Dispose()
g.Dispose()

name = (result.Groups[7].Value.Replace("<b>","").Replace("</b>",""))

FirstVal = size.Remove(size.IndexOf(" x "))
if (int.Parse(FirstVal) >= 300):
coverart.AddThumb(thumb,name,0,0,result.Groups[4].Value)
static def GetResult(param):
return param

I've really got to hand it to Alex for the size overlay idea.  It works out very well.  BTW, this script actually overlays the full image size on the thumbnail image, to save on the initial search/download time.
Title: CoverDownloader
Post by: AlexVallat on 2007-01-04 19:25:35
@ kockroach [a href="index.php?act=findpost&pid=461738"][{POST_SNAPBACK}][/a]
The reason the filter as I had it isn't working in the script as you have it in the codebox is indentation. Boo is an indentation-sensitive language. The lines starting with //Create the thumbnail. and ending with coverart.AddThumb(thumb,label,0,0,node["ImageUrlLarge"].InnerText) inclusive all need to be one tab further indented, like I had them in my script. The way Boo works, once the indentation level falls back to the same level as the if statement, that conditional block is closed, so in the code as you quoted only the line caption = System.String.Format("{0} x {1}", large.Width, large.Height) is conditional on the if statement.

@ wraithdu [a href="index.php?act=findpost&pid=461774"][{POST_SNAPBACK}][/a]
Thanks, glad you're finding the scripts useful. I'd only done the size stuff for the Amzon script as a proof of concept sort of thing, and not put it in any of my other scripts. I believe that size display should be handled by the main app, not have to be replicated for every script. The script already has the option of passing back the size of the full image, if known (which my scripts do), so the main app should have the option of displaying this somewhere, really.

Alex
Title: CoverDownloader
Post by: phunkydizco on 2007-01-05 08:16:57
Is it possible to make a shortcut into windows explorer context menu like with mp3tag?
Title: CoverDownloader
Post by: mazy on 2007-01-05 11:32:20
... I believe that size display should be handled by the main app, not have to be replicated for every script. The script already has the option of passing back the size of the full image, if known (which my scripts do), so the main app should have the option of displaying this somewhere, really.

alex (or anyone else), as the coverdownloader's source is open, could you have a look at it and consider developing it any further? i would love that "size overlay on cd's side" feature and then some requests i made (mostly quick way to save cover art to configurable folder with it's name set to string resulting from the search) ...
Title: CoverDownloader
Post by: kockroach on 2007-01-05 13:36:50
@ kockroach [a href="index.php?act=findpost&pid=461738"][{POST_SNAPBACK}][/a]
The reason the filter as I had it isn't working in the script as you have it in the codebox is indentation....

D'oh!  Thought I had indented properly....thanks Alex. 
Title: CoverDownloader
Post by: david_dl on 2007-01-06 10:46:02
...as the coverdownloader's source is open, could you have a look at it and consider developing it any further?...


I was just about to mention this as well, the source is linked near the top of the first post. It would be easier to implement many of these features (such as sizes) by modifying the application instead of using inefficient hacks. By the way the application itself supports a separate field for the size, I just never got around to displaying it in the ListView because I couldn't think of a really easy and good looking way of doing it.
Title: CoverDownloader
Post by: AlexVallat on 2007-01-06 11:12:54
Unfortunately the source as posted won't compile. It is missing references to "Foobar2000" and "Foobar2000Helper". It is also missing references to the Boo dll's, which I guess have to be downloaded separately.

If you want other people to contribute to the project, I'd recommend some documentation.

Looking through some of the source, it is also missing another essential for collaborative development, which is code comments. With enough time I could probably pick through and figure out what is going on, but I'm not sure I can be bothered. Sorry.

Alex
Title: CoverDownloader
Post by: SuperPhly on 2007-01-07 05:23:38
I am unable to overwrite my folder.jpg for each of my albums. Does anyone know how to fix this?
Title: CoverDownloader
Post by: Marc Landis on 2007-01-10 16:00:17
Hi,

I took the source and I am currently working on a new version with features I like to have.

Please post your suggestions so I can try to add them too.

Marc
Title: CoverDownloader
Post by: mobyduck on 2007-01-10 17:27:41
Please post your suggestions so I can try to add them too.
Well, sometimes it hogs my CPU and I have to stop the process via task manager. It would be nice if you could fix that: if you need further information don't hesitate to ask.

A new feature I'd like to see is a customizable filter-by-size option (as in "Only images 300x300 and above" for example).

Oh and, thank you for your time.

Alessandro
Title: CoverDownloader
Post by: 2Pacalypse on 2007-01-10 18:09:30
is there any way you could make it portable (i havent actually tried it to find out if it currently is)
Title: CoverDownloader
Post by: Marc Landis on 2007-01-10 20:52:13
Well, sometimes it hogs my CPU and I have to stop the process via task manager. It would be nice if you could fix that: if you need further information don't hesitate to ask.


I noticed the same and will look into it.

is there any way you could make it portable (i havent actually tried it to find out if it currently is)


I use it on my USB-Stick and it works fine.

Marc
Title: CoverDownloader
Post by: mazy on 2007-01-11 12:12:52
Marc Landis, that's a great news that you're going to continue the development of coverdownloader. my requests are these:
Title: CoverDownloader
Post by: hal9001 on 2007-01-12 19:25:55
To complete Mazy's requests:

* Images have a name written next to them. I'd like to see the ability to edit/copy that name (i.e. turn it into something I can mark with my mouse) to facilitate saving.

* "Browse" checkbox does next to nothing. I don't really get what it's for, probably.

* Google image search doesn't seem to work

* Auto-replace illegal filename characters (mainly ? /) to dashes (or anything else, for that matter. Since the filname area is way too small to scroll and find the illegal character (automatically inserted by fb2k's run command), it's sort of crucial.

* Add a "stop all threads/transfers" button. At present I need to wait quite a lot for the app to quit.

* add image size to image name preview.

* Recently I came across a Firefox extension that can create a customized search (for the search bar) from literally every search field on a website. I don't know if it could help this app in any way, but it would be neat if users could add their own sites to search in, mainly for obscure countries and such: https://addons.mozilla.org/firefox/3698/ (https://addons.mozilla.org/firefox/3698/)
Title: CoverDownloader
Post by: AlexVallat on 2007-01-12 20:56:28
it would be neat if users could add their own sites to search in, mainly for obscure countries and such


You can add your own sites to search in, if you write a script for them. Unfortunately this is considerably trickier to do than just specifying which fields to search on, as you then need to parse the resulting pages to find the images, and so on. I don't think this can be machine-automated, as each source is unique.

If you do find an interesting source, then posting it in this thread is usually a good start to get people interested in writing a script for it, if you don't have the skills yourself.

Alex
Title: CoverDownloader
Post by: Marc Landis on 2007-01-15 14:48:24
Hi,

I started a new Thread, so I will be able to update the first post if a new version is released.

Album Art Downloader (http://www.hydrogenaudio.org/forums/index.php?showtopic=51896)