How to keep MM from adding a song in a playlist twice - by it's title not by it's id?
I already wrote some scripts on reading playlists, doing avanced reporting and so. But now I want to do something more advance. I know there is already a function included in MM which prevents adding a song twice in a playlist. But this is based on the id of a song not by it's title.
So if I have a playlist which already contains e.g. Nothing Compares 2 U by Prince I wan't to forbid adding Nothing Compares 2 U by Sinead O’Connor.
How can I catch the event when a song (or a list of songs) is added by drag and drop to a playlist so that I can check wheather it's name is already in the list an cancel the drop?
Any hints welcome
Mike
Script to prevent MM to add a song twice (by it's name)
Moderators: Gurus, Addon Administrators
Re: Script to prevent MM to add a song twice (by it's name)
You can capture the OnPlaylistChanged event.
http://www.mediamonkey.com/wiki/index.p ... istChanged
The event will pass a playlist object as its parameter but as far as I can tell there's no way to see which track was added. You could then check the entire playlist for duplicate titles.
http://www.mediamonkey.com/wiki/index.p ... istChanged
The event will pass a playlist object as its parameter but as far as I can tell there's no way to see which track was added. You could then check the entire playlist for duplicate titles.