Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

timsit

macrumors newbie
Original poster
Dec 22, 2006
3
7
Help

I have a friend who has asked me to take three large collections of mp3 and merge them. No so bad right? But he wants to keep the best copies, meaning sorting them based on bitrate, rating, etc.

I can dump them into itunes and have it show duplicates then hand sort them, but it seems that Automator or Applescript would be perfect for the job.

I am a novice Applescripter at best so I'm asking can anybody out there get me started with the basic script? I should be able to modify it based on the criteria he gives me.

Thanks for the help.
 

Nutter

macrumors 6502
Mar 31, 2005
432
0
London, England
You want something along these lines:

Code:
tell application "iTunes"
	set markedPlaylist to (make new user playlist with properties {name:"Tracks to delete"})
	
	repeat with someTrack in tracks of library playlist 1
		repeat with someOtherTrack in tracks of library playlist 1
			if (database ID of someTrack) is not equal to (database ID of someOtherTrack) then
				if ((name of someTrack) is equal to (name of someOtherTrack)) and ((artist of someTrack) is equal to (artist of someOtherTrack)) then
					if (bit rate of someTrack) is greater than (bit rate of someOtherTrack) then duplicate someOtherTrack to markedPlaylist
				end if
			end if
		end repeat
	end repeat
end tell

However, this will be very slow.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.