IPB

Welcome Guest ( Log In | Register )

12 Pages V  < 1 2 3 4 > »   
Reply to this topicStart new topic
CoverDownloader, Walmart+Amazon so far
topdownjimmy
post May 14 2006, 01:58
Post #26





Group: Members
Posts: 525
Joined: 1-January 05
From: Boston
Member No.: 18762



QUOTE (DoXer @ Apr 23 2006, 14:48) *
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/ 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.
Go to the top of the page
+Quote Post
david_dl
post May 14 2006, 02:33
Post #27





Group: Members
Posts: 604
Joined: 17-December 05
From: New Zealand
Member No.: 26461



QUOTE (topdownjimmy @ May 14 2006, 13:58) *
i'd also like to suggest 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
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"
Go to the top of the page
+Quote Post
parive3
post May 23 2006, 10:43
Post #28





Group: Members
Posts: 54
Joined: 22-June 04
Member No.: 14831



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

This post has been edited by parive3: May 25 2006, 10:05
Go to the top of the page
+Quote Post
david_dl
post Jun 1 2006, 05:15
Post #29





Group: Members
Posts: 604
Joined: 17-December 05
From: New Zealand
Member No.: 26461



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

This post has been edited by david_dl: Jun 1 2006, 05:21
Go to the top of the page
+Quote Post
Tich
post Jun 1 2006, 15:48
Post #30





Group: Members
Posts: 45
Joined: 20-May 06
Member No.: 30979



thanks for your fantastic work smile.gif

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 sad.gif

This post has been edited by Tich: Jun 1 2006, 19:47
Go to the top of the page
+Quote Post
Chaser
post Jun 1 2006, 16:41
Post #31





Group: Members
Posts: 403
Joined: 30-August 04
From: Germany, Bavaria
Member No.: 16641



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!
Go to the top of the page
+Quote Post
topdownjimmy
post Jun 1 2006, 18:05
Post #32





Group: Members
Posts: 525
Joined: 1-January 05
From: Boston
Member No.: 18762



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

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?

This post has been edited by topdownjimmy: Jun 1 2006, 19:19
Go to the top of the page
+Quote Post
david_dl
post Jun 1 2006, 20:30
Post #33





Group: Members
Posts: 604
Joined: 17-December 05
From: New Zealand
Member No.: 26461



QUOTE (Tich @ Jun 2 2006, 03:48) *
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 sad.gif


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


QUOTE (Chaser @ Jun 2 2006, 04:41) *
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.

QUOTE (Chaser @ Jun 2 2006, 04:41) *
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.

QUOTE (topdownjimmy @ Jun 2 2006, 06:05) *
A million thank yous for this program, and for providing RateYourMusic support. It all makes me very very happy. smile.gif

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 biggrin.gif

QUOTE (topdownjimmy @ Jun 2 2006, 06:05) *
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"
Go to the top of the page
+Quote Post
topdownjimmy
post Jun 1 2006, 20:48
Post #34





Group: Members
Posts: 525
Joined: 1-January 05
From: Boston
Member No.: 18762



QUOTE (david_dl @ Jun 1 2006, 15:30) *
QUOTE (topdownjimmy @ Jun 2 2006, 06:05) *

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!
Go to the top of the page
+Quote Post
bsommer
post Jun 1 2006, 22:16
Post #35





Group: Members
Posts: 18
Joined: 28-May 06
Member No.: 31226



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"?
Go to the top of the page
+Quote Post
roentgen
post Jun 1 2006, 22:22
Post #36





Group: Members
Posts: 271
Joined: 19-February 06
Member No.: 27893



QUOTE (bsommer @ Jun 2 2006, 00:16) *
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
"C:\Program Files\fb2k\coverart\coverart.exe" "%artist%" "%album%" "E:\%artist%.%album%.folder.jpg"

(modify the paths with those on your system)

This post has been edited by roentgen: Jun 1 2006, 22:23
Go to the top of the page
+Quote Post
bsommer
post Jun 2 2006, 01:51
Post #37





Group: Members
Posts: 18
Joined: 28-May 06
Member No.: 31226



"alert, error writing file"

thats the error message i get when i click on the cover image to save it to the folder designated sad.gif
Go to the top of the page
+Quote Post
topdownjimmy
post Jun 2 2006, 02:03
Post #38





Group: Members
Posts: 525
Joined: 1-January 05
From: Boston
Member No.: 18762



QUOTE (bsommer @ Jun 1 2006, 20:51) *
"alert, error writing file"

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

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)
Go to the top of the page
+Quote Post
pepito
post Jun 2 2006, 03:59
Post #39





Group: Members
Posts: 132
Joined: 23-May 06
From: Nice - France
Member No.: 31068



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#

This post has been edited by pepito: Jun 2 2006, 04:07
Go to the top of the page
+Quote Post
david_dl
post Jun 2 2006, 05:46
Post #40





Group: Members
Posts: 604
Joined: 17-December 05
From: New Zealand
Member No.: 26461



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.
Go to the top of the page
+Quote Post
Chaser
post Jun 2 2006, 08:36
Post #41





Group: Members
Posts: 403
Joined: 30-August 04
From: Germany, Bavaria
Member No.: 16641



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?
Attached thumbnail(s)
Attached Image
 
Go to the top of the page
+Quote Post
david_dl
post Jun 2 2006, 11:24
Post #42





Group: Members
Posts: 604
Joined: 17-December 05
From: New Zealand
Member No.: 26461



Hmmm, the GUI definately needs some work. The trouble is, python is way more fun than C++ tongue.gif
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.
Go to the top of the page
+Quote Post
Chaser
post Jun 2 2006, 13:17
Post #43





Group: Members
Posts: 403
Joined: 30-August 04
From: Germany, Bavaria
Member No.: 16641



Thank you for looking into it!
Go to the top of the page
+Quote Post
Chaser
post Jun 2 2006, 15:10
Post #44





Group: Members
Posts: 403
Joined: 30-August 04
From: Germany, Bavaria
Member No.: 16641



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..)
Go to the top of the page
+Quote Post
Tich
post Jun 2 2006, 16:03
Post #45





Group: Members
Posts: 45
Joined: 20-May 06
Member No.: 30979



QUOTE (david_dl @ Jun 1 2006, 21:30) *
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 smile.gif

Tich
Go to the top of the page
+Quote Post
david_dl
post Jun 3 2006, 11:01
Post #46





Group: Members
Posts: 604
Joined: 17-December 05
From: New Zealand
Member No.: 26461



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
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"
Go to the top of the page
+Quote Post
Chaser
post Jun 3 2006, 23:30
Post #47





Group: Members
Posts: 403
Joined: 30-August 04
From: Germany, Bavaria
Member No.: 16641



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...

This post has been edited by Chaser: Jun 3 2006, 23:38
Go to the top of the page
+Quote Post
topdownjimmy
post Jun 4 2006, 01:14
Post #48





Group: Members
Posts: 525
Joined: 1-January 05
From: Boston
Member No.: 18762



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)
Go to the top of the page
+Quote Post
parive3
post Jun 4 2006, 02:43
Post #49





Group: Members
Posts: 54
Joined: 22-June 04
Member No.: 14831



QUOTE (david_dl @ Apr 8 2006, 15:30) *
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
Go to the top of the page
+Quote Post
Tich
post Jun 4 2006, 11:50
Post #50





Group: Members
Posts: 45
Joined: 20-May 06
Member No.: 30979



if you want to search for an album only just use this command:
CODE
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. smile.gif

Tich
Go to the top of the page
+Quote Post

12 Pages V  < 1 2 3 4 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 26th July 2014 - 03:09