• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
iTunes XML Playlist IDs changing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

iTunes XML Playlist IDs changing


  • Subject: iTunes XML Playlist IDs changing
  • From: Jerry Brace <email@hidden>
  • Date: Mon, 29 Aug 2005 08:46:22 -0230

My application uses the iTunes Music Library.xml file generated by iTunes. I am parsing the XML to display a list of Playlists that the user can choose to play. Right now I use an AppleScript to play the playlist using the playlist ID of the playlist selected.

Sample:

tell application "iTunes"
    play playlist id 1617
end tell

The problem with using playlist ID is that all of the playlist IDs change when songs are added or removed to or from iTunes. If my application is open while songs are being added to iTunes the playlist IDs that have been loaded are no longer valid. I changed my code to read from the XML file again as a test within the app to refresh the list - but I noticed that iTunes does not write the updated information until iTunes is closed.

The iTunes XML has a field called "Playlist Persistent ID" - I assume this never changes. Is there a way to play a playlist via AppleScript using the "Playlist Persistent ID" instead of the "Playlist ID"?

Any help would be great - I've been stuck on this for a while now.

Many thanks,
Jerry

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: [Way Off Topic] Keychain Access question
  • Next by Date: PackageMaker and multiple locations
  • Previous by thread: [Moderator]Re: [Way Off Topic] Keychain Access question
  • Next by thread: PackageMaker and multiple locations
  • Index(es):
    • Date
    • Thread