Problem getting Auto script to work

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

sd_smoker

Problem getting Auto script to work

Post by sd_smoker »

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?
sd_smoker
Posts: 13
Joined: Sat Jan 05, 2008 10:19 pm

Post by sd_smoker »

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
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Your 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.
sd_smoker
Posts: 13
Joined: Sat Jan 05, 2008 10:19 pm

Post by sd_smoker »

Thanks. That's certainly disappointing. I'll go ahead and post this to the Bug Reports forum.
PetrCBR
Posts: 1783
Joined: Tue Mar 07, 2006 5:31 pm
Location: Czech
Contact:

Post by PetrCBR »

Thanks. That's a bug in MM (OnTrackAdded is never called). Will be fixed in next release.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

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.
Post Reply