1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Join between 2 playlists, as in SQL

Discussion in 'iTunes & AppleScripts' started by UKenGB, Jan 15, 2016.

  1. UKenGB

    UKenGB Member

    I need to know what tracks exist in both playlists. I'm working through a playlist and exporting the tracks, but want to only export those that also exist in another (known) playlist which could be large. I can't seem to come up with anything that actually runs. Anyone any suggestions?
  2. kirk

    kirk Administrator Staff Member

    Make a smart playlist where the conditions are:

    Match All of the following rules

    Playlist Is Playlist1
    Playlist Is Playlist2

    The resulting tracks will be those in both playlists.
  3. DougAdams

    DougAdams Moderator Staff Member

    It should be simple enough to compare the database IDs of the tracks in two separate lists (or NSArrays).

    Or, use Kirk's suggestion. Or, put the playlists in a playlist folder; when displaying the playlist folder you will only see all the tracks that are in both, no dupes.
  4. UKenGB

    UKenGB Member

    Thanks guys, but creating a new playlist just for that is a no-go. I'm trying to work through several specified playlists but only work on tracks that exist in another known playlist. It needs to be flexible so fixed playlists aren't the answer. In the end for each track I'm checking to see if the track's 'playlists' contains the other playlist which seems to be quick enough to not notice.

Share This Page