View Single Post
Old 2nd February 2006, 03:46   #328
Junior Member
Join Date: May 2005
Posts: 23
Script To Download Album Cover Art

Here's something I wrote yesterday. Not sure if it should get its own thread, but since it's a winamp script, I'll include it here.

You need to download AlbumArtAggregator, which you can get free online. I have the script download the file into the folder with the mp3, but have it named by the album cover. I added this to toaster "%dir%\\%album%.jpg;" because that way I can have multiple album covers in one directory.

It should be fairly easy to substitute the location of AAA.exe or the name of the image file downloaded. Save it as sendto_AAA.vbs in your WA scripts folder.

PHP Code:
on error resume next

' This requires AlbumArtAggregator.exe
You can find it at:
' [url][/url]

' This program will look for album.jpg in 
the same folder the mp3 resides in.
' If the .jpg doesn't exist
' this .vbs will use AlbumArtAggregator.exe
to download a file into album.jpg

"C:\Program Files\AlbumArtGen\AlbumArtAggregator.exe"

Dim fso
set fso 

vbq chr(34' double quotes for later usage

x = GetSendToItems
if ubound(x,1) > 0 Then

dim AlbCompl ' 
This keeps track of what albums were done (so no repeats)

each track in x
    Set f 
instr(AlbComplf.ParentFolder "\" & track.album & ".jpg") then
        'An attempt was already made on this album
        'msgbox "
Done Before"
        'add target filename to albcompl - so that we're not trying 
        'to get the same album more than once
        AlbCompl=AlbCompl & f.ParentFolder & "
\" & track.album & ".jpg" & vbcrlf

        if fso.FileExists ( f.ParentFolder & "
\" & track.album & ".jpg") then
            'msgbox "
Image exists" & f.ParentFolder & "\" & track.album & ".jpg"
            'msgbox "
Image not found" & f.ParentFolder & "\" & track.album & ".jpg"

            'Run AAA to download the file
            cRun vbq & AAA & vbq & " " & _
            vbq & track.artist & " 
" & track.album & vbq & _
            " " & vbq & f.ParentFolder & "
\" & track.album & ".jpg" & vbq
        end if
        '    msgbox track.filename
    end if
end if
msgbox "
Noof jpegs attempted to download" & ubound(split(AlbCompl,vbcrlf)) 

private sub cRun(strcRun) 'subroutines to call AAA
Dim WSHShell 
Set WSHShell = CreateObject("

WSHShell.Run strcRun, 1, true 
end sub 
MarquisEXB is offline   Reply With Quote