In the sample script below, I am using the CurrentSongList collection. My problem is that even with all the tracks I want to overwrite selected (Ctrl+A), the track that was selected via mouse click is the only one whose album art is overwritten. Not sure why this is happening?
Code: Select all
Sub QuickTrackMod Dim currentSongList, song, i On Error Resume Next Set currentSongList = SDB.CurrentSongList For i=0 To currentSongList.Count-1 Set song = currentSongList.Item(i) 'Commented out because calling 'Delete' does not seem to alter the AlbumArt collection here, even after calling UpdateAll. Yay infinite loops... 'Do While song.AlbumArt.Count > 0 'MsgBox "Deleting..." 'song.AlbumArt.Delete(0) 'Loop Set newArt = song.AlbumArt.AddNew newArt.PicturePath = "D:\Music\My Music\Album Art\[album art file here].jpg" newArt.Description = "Album Art" newArt.ItemType = 3 newArt.ItemStorage = 0 Next currentSongList.UpdateAll MsgBox "Done" End Sub