Problem getting Auto script to work

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Problem getting Auto script to work

by trixmoto » Tue Jan 08, 2008 4:34 am

Will it also be called when a podcast is downloaded, or will that be a separate event?

by PetrCBR » Mon Jan 07, 2008 5:17 pm

Thanks. That's a bug in MM (OnTrackAdded is never called). Will be fixed in next release.

by sd_smoker » Mon Jan 07, 2008 2:17 pm

Thanks. That's certainly disappointing. I'll go ahead and post this to the Bug Reports forum.

by trixmoto » Mon Jan 07, 2008 5:54 am

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! :(

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

Problem getting Auto script to work

by sd_smoker » Sat Jan 05, 2008 9:32 pm

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?

Top