by chrisjj » Fri Oct 14, 2016 4:57 am
Just Guessing wrote:Is there a simple scripting method to test if a song is already in a playlist?
I'd like to avoid the MM duplication confirmation page I would get otherwise.
Just Guessing wrote:
I can tighten the goal down to 5 lines of code, but wonder if I haven't missed some single line that does the job:
Dup = False
for i = 0 To SDB.PlaylistByTitle(Playlist).Tracks.Count - 1
if SDB.PlaylistByTitle(Playlist).Tracks.Item(i).ID = NewSong.ID Then Dup = True
if Dup = False Then SDB.PlaylistByTitle(Playlist).AddTrack NewSong
by Just Guessing » Tue Sep 13, 2016 11:29 am
by Lowlander » Tue Sep 13, 2016 11:13 am
by Just Guessing » Tue Sep 13, 2016 10:18 am