by raybeau528 » Mon Feb 23, 2009 10:39 am
What would be the best method to determine, via a script, if a track exists in a playlist?
I certainly could loop through all tracks and check for matching song.id. Not heavy processing if I'm checking for 1 track in 1000. Checking for 1000 tracks in a 10,000 track playlist could result in a million cycles!
Does the AddTrackbyID(ID) method return any indication whether the track ID already exists in the playlist?
The Properties editor / Classification lists the playlists for which the selected song is a member. Is there a scripting property/method to access that?
Thanks!
Ray
What would be the best method to determine, via a script, if a track exists in a playlist?
I certainly could loop through all tracks and check for matching song.id. Not heavy processing if I'm checking for 1 track in 1000. Checking for 1000 tracks in a 10,000 track playlist could result in a million cycles!
Does the AddTrackbyID(ID) method return any indication whether the track ID already exists in the playlist?
The Properties editor / Classification lists the playlists for which the selected song is a member. Is there a scripting property/method to access that?
Thanks!
Ray