by sd_smoker » Sat Jan 05, 2008 10:23 pm
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):
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 Sub
Okay, after a little debugging the problem appears to be that the [b]AddPodcast[/b] method never gets called. Is the [b]OnTrackAdded[/b] 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):
[code]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 Sub[/code]