Posted: Wed May 28, 2008 11:33 pm
Any hints on classical searches? They're impossible!
The Music Manager for Serious Collectors
http://www.mediamonkey.com/forum/
Code: Select all
CreateObject("WScript.Shell").Run Command, 1, True
Code: Select all
Dim Storage, itm, pic, img
Code: Select all
For i = 0 To List.Count - 1
Command = Trim(QStr(Tool.ProgramPath) & " " & GetFilledParam(i, List, Tool.CLArguments))
If Not RunCommand(Command) Then
SDB.MessageBox Tool.Name & " (" & Command & ") could not be executed.", mtError, Array(mbOK)
Exit Sub
End If
Next
End If
''' new code follows .....
Set itm=List.item(0)
if SDB.Tools.FileSystem.FileExists(Left(itm.Path,InStrRev(itm.Path, "\") - 1) & "\folder.jpg") Then
For i = 0 To List.Count - 1
Set itm=List.item(i)
Set pic = itm.AlbumArt
' WMA, APE => link, MP3, FLAC => Tag
Storage = (instr(itm.Path,".wma")+instr(itm.Path,".ape")>0)
Set img = pic.AddNew
img.RelativePicturePath = "folder.jpg"
img.ItemType = 3
img.Description = "Added by AAD"
If Not Storage Then
img.ItemStorage = 0
Else
img.ItemStorage = 1
End if
pic.UpdateDB
next
List.UpdateAll
end if
''''' End of new code
End Sub
Code: Select all
' A simple script to control Album Art Downloader
'
' Version 1, 01/06/08 GuHu
'
' Installation: copy the follwoing into scripts.ini (without ')
' please costumize the path to AlbumArtDownloader and your preferences (see above)
' the script uses the package Album Art Downloader
'[AAD]
'Filename=AAD.vbs
'Procname=AAD
'Order=33
'DisplayName=Control Album Art Downloader
'Description=Control Album Art Downloader
'Language=VBScript
'ShortCut = Alt+Y
'ScriptType=0
Sub AAD
' Define variables
Dim list, itm, i, j, k, tmp, Albums, Album, Artist, path
Dim artmodex(10)
for i=0 To 10
artmodex(i)=""
next
' enter here your preferences
Dim prog : prog ="C:\Programme\AlbumArtDownloader\AlbumArt.exe"
artmodex(0) = "ape"
artmodex(1) = "wma"
' end preferences
Set list = SDB.CurrentSongList
Set Albums = list.Albums
For i=0 To Albums.count-1
Set Album=Albums.item(i)
Artist=Album.Artist.Name
Name=Album.Name
path=Album.Tracks.item(0).Path
path=Left(path,InStrRev(path, "\") - 1)
CreateObject("WScript.Shell").Run prog & " /artist """ & Artist & """ /album """ & Name & """ /path """ & path & "\Folder.jpg""", 1, True
if SDB.Tools.FileSystem.FileExists(path & "\folder.jpg") Then
For j = 0 To Album.Tracks.Count - 1
Set itm=Album.Tracks.Item(j)
filetype=Right(itm.path,Len(itm.path)-InStrRev(itm.path,"."))
Storage=0
for k=0 to 10
if filetype=artmodex(k) then
Storage=1
end if
next
Set pic = itm.AlbumArt
Set img = pic.AddNew
img.RelativePicturePath = "folder.jpg"
img.ItemType = 3
img.Description = "Added by AAD"
img.ItemStorage = Storage
pic.UpdateDB
next
end if
next
list.UpdateAll
end sub