Fix Playlist Dups 4.6 - Update 08/02/2011

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

Peke
Posts: 17484
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Post by Peke »

I think it is possible, but I think that I need to think more.

Hmmm.... Adding/creating DIM of Playlist Type and then Add One By One into it with AddSongs than Run Script and than Copy DIM to Now Playing???
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
scratchie77
Posts: 10
Joined: Tue Nov 14, 2006 5:53 am

Post by scratchie77 »

Thanks for the replies!

I was kinda hoping the autoplaylist's tracks were stored in the database like normal playlist (i understand why they aren't, lots of read/writes would be required)

I don't want to create a playlist on the fly, for example my current setup is:

Autoplaylist - Least Played Mix (unedited)
Regular playlist - Least Played Mix

Those names won't change, i thought i would be able to reference the playlists by name in a script in order to clear/copy songs to it and then run the script on startup.

I am only new to the monkey, much to learn!
Peke
Posts: 17484
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Post by Peke »

So if I got you correctly you wanna copy state of AutoPlaylist to regular so that regular playlist contain tracks from That AutoPlaylist at script execute time and then use that normal playlist at startup?
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
scratchie77
Posts: 10
Joined: Tue Nov 14, 2006 5:53 am

Post by scratchie77 »

Excactly, because i am unable to run the script on an autoplaylist.

I listen to the majority of my music on my ipod, so everytime i sync my ipod i need to make a copy of the autoplaylist to a regular playlist, then run the script on the regular playlist.

It works, but a little script that automates the process would be nice.
Peke
Posts: 17484
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Post by Peke »

Can be done, let me see I'll note all that down and will see if I can make something or point Original artist to change so that this work.

@Trixmoto
What do you think of a child Node under AutoPlaylist That Copy current State of AutoPlaylist and Run Duplicate cleanup script?
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
scratchie77
Posts: 10
Joined: Tue Nov 14, 2006 5:53 am

Post by scratchie77 »

Thanks heaps Peke, that would be great.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

I don't think you can create new autoplaylists via a script, can you?
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Peke
Posts: 17484
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Post by Peke »

No need to create auto-playlist. You need to create Child playlist by coping current state of auto-playlist to that newly created playlist so that user can use that as reference for synchronize with MP3Player.

Create Auto-playlist Hmmmmmm...... theoreticaly it could e possile as we can read if playlist is auto or not?!?!?!? Must investigate.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
mexifelio

Re: Fix Playlist Dups 4.2

Post by mexifelio »

trixmoto wrote:This script asks you to enter a playlist name. It then checks the entered playlist for duplicate tracks (using ID), removing any found (leaving the first one remaining). If you wish each removal to be confirmed you can set this confirmation in the MM options. This script can also be downloaded from my website.

:o :o :o NEW CODE BELOW :o :o :o
Is this posted on any other site, trix.dork.com seems to be down...
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Sorry, that's my old website! My website is now http://trixmoto.net :)
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Guest

Re: Small Modification

Post by Guest »

scratchie77 wrote:Triximoto,

Great script.

Most of my auto playlists tend to have a large number of songs by the same artist in them so i made a small modification to make the script remove duplicate artists, and leave the song least recently heard by the artist in the playlist.

Code: Select all

case 4
If (track1.artistname = track2.artistname) and (track1.lastplayed < track2.lastplayed) Then dup = true
If (track1.artistname = track2.artistname) and (track1.lastplayed > track2.lastplayed) Then dupeArtist = true

and then down further in the loop

Code: Select all

For j = i+1 To tracks.count-1
        If dup(tracks.Item(i),tracks.Item(j)) Then list.RemoveTrack(tracks.Item(j))
        if dupeArtist = true Then list.RemoveTrack(tracks.Item(i))
        If progress.Terminate Then Exit For
Next 
I know there are cleaner ways to code it, but hey it works!

What i would really like to do is on startup copy the autoplaylist to a regular playlist and then automatically run your script.

i don't suppose you could point me in the right direction on a simple way to copy the playlist?
Hi

What I would like to do is the following; I would like to extend the possibily of autoplaylist creation by LIMITING to 1 (or to a customizable number) the number of tracks includeb by Artist (or i.e. album)

Let's say that I want to include in my playlist 1hr of indie music BUT only 1 song per artist.

As far as I now, this is not possible using ONLY the autoplaylist creator so i thought it could be a nice idea to create the autoplaylist AND THEN removing the duplicates using this script (If there is a simpler way to achieve my goal, please let me know :) )

Anywai, I have added the following to the original script

default = 4
....
Drp1.AddItem("No duplicate Artist")
....
case 4
if (track1.artistname = track2.artistname) Then dupeArtist = true

Although I select the 4th choice (which however I set to default), no duplicate tracks FROM the same artist are removed from the playlist.

Is there something wrong in what I have added or do have to add anything else.

Thx for your help
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

I don't see why this wouldn't work. Looking at the code I'm not entirely sure that it's 100% correct. It's one of my earliest scripts and I think it needs a rewrite really. I'll add this to my list, but let me know if you manage to get it working.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
crcm
Posts: 62
Joined: Wed Mar 16, 2005 12:13 am
Location: Finland

Post by crcm »

I just found this script...but it won't work at all :(

I have tested it with artist which have 1-5 same titles. Exactly same titles. (live, cdm, cds. cd) Total tracks 300+. Track ID's are all different.

I have used "artist & title" option. At First it removes quite a lot of tracks but it also leaves a lot's of same tracks. (actually 2+ same tracks, Sometimes even 5 same titles) When I run it again and again it removes couple tracks each time. I think that it also removes tracks that are not dups eventually.

btw one thing could be nice to add....duration. Because same track title could be 4min version and 10min version.

Example:

Title1 4:12 include
Title1 4:18 remove
Title1 4:11 remove
Title1 7:02 Include

if duration differs example one minute...it will be added.

just thinking... but I hope you get the basic functions working.
crcm
Jerking monkey since 2005 - FINNISH Translator
MM4.X | Win7 enterprise sp1 | SPDIF earsex | Denon sushi | AKG hearing aid | Lumia 820 color blindness OR Samsung Galactical Voodoo magic
Xanadu
Posts: 4
Joined: Wed Apr 11, 2007 4:15 am
Location: Belgium

Post by Xanadu »

Hey
I have an empty playlist called compilation cd's. Then I have child playlists
called cd1, cd2, ... (which are not empty of course)
When I check the compilation cd playlist(include children is checked) it doesn't find any duplicates although there are.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

New version (4.3) is now available to download from my website. It should fix all current problems! Changes include...

- Added option to remove tracks from the same artist
- Added duplicate mode remembered between runs
- Added playlists found and listed in a dropdown to select
- Fixed bugs with Now Playing mode not removing the correct tracks

Don't forget that if you are running this for a playlist you will need to refresh the playlist to notice the changes. :)
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Post Reply