by raiden63 » Fri Nov 28, 2014 11:50 pm
As part of an auto-organize workflow script I am writing, I am trying to automatically re-tag the album art of all the tracks in a given album. The tracks are all FLAC format; I'm not sure if that's a problem for MM, since I'm given to understand that the tag standard is different from, say, MP3.
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
MediaMonkey Gold version 4.1.5.1719
As part of an auto-organize workflow script I am writing, I am trying to automatically re-tag the album art of all the tracks in a given album. The tracks are all FLAC format; I'm not sure if that's a problem for MM, since I'm given to understand that the tag standard is different from, say, MP3.
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]
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
[/code]
MediaMonkey Gold version 4.1.5.1719