Author: MarquisEXB

Link: http://forums.winamp.com/showthread.php?postid=1856846#post1856846

on error resume next 
 
' This requires AlbumArtAggregator.exe 
' You can find it at: 
' <a href="http://team.thenexusnet.com/nexus/AAA/" target="_blank">http://team.thenexusnet.com/nexus/AAA/</a> 
' 
' 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 
 
AAA = "C:\Program Files\AlbumArtGenAlbum\ArtAggregator.exe" 
 
Dim fso 
set fso = CreateObject("Scripting.FileSystemObject") 
 
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) 
 
for each track in x 
    Set f = fso.GetFile(track.filename) 
    if instr(AlbCompl, f.ParentFolder & "\" & track.album & ".jpg") then 
        'An attempt was already made on this album 
        'msgbox "Done Before" 
    else 
        '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" 
        else 
            '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 
next 
end if 
msgbox "No. of jpegs attempted to download: " & ubound(split(AlbCompl,vbcrlf)) 
quit 
 
private sub cRun(strcRun) 'subroutines to call AAA 
Dim WSHShell 
Set WSHShell = CreateObject("WScript.Shell") 
 
WSHShell.Run strcRun, 1, true 
end sub
 
examples/application/download_album_coverart.txt · Last modified: 2006/11/06 15:44
 
Recent changes RSS feed Creative Commons License Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Music Plugins