Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Automatically filter duplicates from playlists (Read 1928 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Automatically filter duplicates from playlists

Is there any way for a playlist to automatically perform the "edit > remove duplicates" function? I created a separate playlist from my autoplaylist and if a I add a new album by band that was already on the new playlist, if I add the whole discography, I get duplicates (naturally). Can them be somehow whipped  automatically?

Automatically filter duplicates from playlists

Reply #1
add a WSH panel mod panel to your layout and put this code in...

Code: [Select]
function on_playlist_items_added() {
    fb.RunMainMenuCommand("Edit/Remove duplicates");
}

 

Automatically filter duplicates from playlists

Reply #2
i just realised the above only worked when dragging files onto the playlist. this should work properly...

Code: [Select]
function on_playlist_items_added() {
    plman.SetActivePlaylistContext();
    fb.RunMainMenuCommand("Edit/Remove duplicates");
}

//this code draws the background the same colour as the foobar splitter so you can resize the panel to hide it better.

var ww = 0;
var wh = 0;

function on_size() {
    ww = window.Width;
    wh = window.Height;
}

function on_paint(gr) {
    gr.FillSolidRect(0, 0, ww, wh, utils.GetSysColor(15));
}