Problem getting Auto script to work
-
sd_smoker
Problem getting Auto script to work
This is my first script and I'm having a little trouble. I basically created a script based on this one that I'd like to run every time a podcast is downloaded. I added the file to the "Scripts/Auto/" folder and restarted MM. When I downloaded a podcast none of the changes had been made? I'm sure I'm missing something really basic here. Any ideas?
Okay, after a little debugging the problem appears to be that the AddPodcast method never gets called. Is the OnTrackAdded event fired when a podcast is downloaded? I realize the example I based my code off of is year old and I'm on MM3. Has something changed in version 3? Can anyone tell me what even to use in order to modify the id3 tags on a newly downloaded podcast?
Here's the code I'm using for reference (the msgbox never fires):
Here's the code I'm using for reference (the msgbox never fires):
Code: Select all
Sub onStartup
Script.RegisterEvent SDB, "OnTrackAdded", "AddPodcast"
End Sub
Sub AddPodcast(track)
MsgBox "AddPodcast was called!"
If UCase(track.Genre) = "PODCAST" Then
track.AlbumArtistName = track.ArtistName
track.Comment = ""
track.Author = ""
track.Copywrite = ""
track.Encoder = ""
track.TrackOrderStr = "1"
track.UpdateArtist
track.UpdateAlbum
track.UpdateDB
End If
End SubYour code is correct and although this event used to fire whenever a track was added (manually or via file monitor) it appears to no longer be firing at all. Must be a bug in MM3! 
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Will it also be called when a podcast is downloaded, or will that be a separate event?
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.