Script to prevent MM to add a song twice (by it's name)

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

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

Topic review
   

Expand view Topic review: Script to prevent MM to add a song twice (by it's name)

Re: Script to prevent MM to add a song twice (by it's name)

by rivorson » Tue Jan 10, 2017 5:11 pm

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.

Script to prevent MM to add a song twice (by it's name)

by Mike24 » Tue Jan 10, 2017 3:46 pm

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

Top