• 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
Duplicates files in iTunes after running applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Duplicates files in iTunes after running applescript


  • Subject: Duplicates files in iTunes after running applescript
  • From: Paul Taylor <email@hidden>
  • Date: Wed, 31 Dec 2008 11:33:08 +0000

Hi, I have created some applescript, that creates a playlist of all the files I have modified outside of iTunes, part of the reason for doing this is that iTunes then has updated metadata information for these files without having to select 'Get Info' within iTunes. The trouble is that for some reason some (but not most) of the files now appear in iTunes twice both referring to the exactly same physical file.

Can anybody see what is going wrong

thanks Paul

example applescript

tell app "iTunes"
set new_playlist to (make user playlist with properties {name:"newList12/20/08 4:01 PM"})
add(POSIX file "/Users/renaudg/Music/iTunes/iTunes Music/Astral Projection/Another World/09 Still on mars.mp3") to new_playlist
add(POSIX file "/Users/renaudg/Music/iTunes/iTunes Music/U2/October/03 I Threw A Brick Through A Window.mp3") to new_playlist
add(POSIX file "/Users/renaudg/Music/iTunes/iTunes Music/Emilie Simon/Emilie Simon (bonus disc)/01 Desert (english version).mp3") to new_playlist
repeat with nexttrack in (get every track of new_playlist)
refresh nexttrack
end repeat
end tell


Within the iTune sMusic folder it shows Still on Mars twice (wrong) but it only shows 'I Threw A Brick Through A Window.' once (correct), this is reflected in the iTunes xml file

<dict>
<key>Track ID</key><integer>5779</integer>
<key>Name</key><string>Still on Mars</string>
<key>Artist</key><string>Astral Projection</string>
<key>Album Artist</key><string>Astral Projection</string>
<key>Album</key><string>Another World</string>
<key>Genre</key><string>Goa trance</string>
<key>Kind</key><string>Fichier audio MPEG</string>
<key>Size</key><integer>13298834</integer>
<key>Total Time</key><integer>452754</integer>
<key>Track Number</key><integer>9</integer>
<key>Year</key><integer>1999</integer>
<key>Date Modified</key><date>2008-12-20T14:55:11Z</date>
<key>Date Added</key><date>2008-12-13T15:48:44Z</date>
<key>Bit Rate</key><integer>234</integer>
<key>Sample Rate</key><integer>44100</integer>
<key>Comments</key><string>10x to http://soundform.data</string>
<key>Artwork Count</key><integer>1</integer>
<key>Sort Album Artist</key><string>Astral Projection</string>
<key>Sort Artist</key><string>Astral Projection</string>
<key>Persistent ID</key><string>698AAECE8A893243</string>
<key>Track Type</key><string>File</string>
<key>Location</key><string>file://localhost/Users/renaudg/Music/iTunes/iTunes Music/Astral Projection/Another World/09 Still on Mars.mp3</string>
<key>File Folder Count</key><integer>4</integer>
<key>Library Folder Count</key><integer>1</integer>
</dict>
<dict>
<key>Track ID</key><integer>41012</integer>
<key>Name</key><string>Still on Mars</string>
<key>Artist</key><string>Astral Projection</string>
<key>Album Artist</key><string>Astral Projection</string>
<key>Album</key><string>Another World</string>
<key>Genre</key><string>Goa trance</string>
<key>Kind</key><string>Fichier audio MPEG</string>
<key>Size</key><integer>13298834</integer>
<key>Total Time</key><integer>452754</integer>
<key>Track Number</key><integer>9</integer>
<key>Year</key><integer>1999</integer>
<key>Date Modified</key><date>2008-12-20T14:55:11Z</date>
<key>Date Added</key><date>2008-12-20T15:09:14Z</date>
<key>Bit Rate</key><integer>234</integer>
<key>Sample Rate</key><integer>44100</integer>
<key>Comments</key><string>10x to http://soundform.data</string>
<key>Artwork Count</key><integer>1</integer>
<key>Sort Album Artist</key><string>Astral Projection</string>
<key>Sort Artist</key><string>Astral Projection</string>
<key>Persistent ID</key><string>8F35FE4A2D1CF5AB</string>
<key>Track Type</key><string>File</string>
<key>Location</key><string>file://localhost/Users/renaudg/Music/iTunes/iTunes Music/Astral Projection/Another World/09 Still on Mars.mp3</string>
<key>File Folder Count</key><integer>4</integer>
<key>Library Folder Count</key><integer>1</integer>
</dict>


<dict>
<key>Track ID</key><integer>6011</integer>
<key>Name</key><string>I Threw a Brick Through a Window</string>
<key>Artist</key><string>U2</string>
<key>Album</key><string>October</string>
<key>Genre</key><string>Pop/rock</string>
<key>Kind</key><string>Fichier audio MPEG</string>
<key>Size</key><integer>9200704</integer>
<key>Total Time</key><integer>294556</integer>
<key>Track Number</key><integer>3</integer>
<key>Year</key><integer>1981</integer>
<key>Date Modified</key><date>2008-12-20T14:59:22Z</date>
<key>Date Added</key><date>2008-12-15T08:48:44Z</date>
<key>Bit Rate</key><integer>249</integer>
<key>Sample Rate</key><integer>44100</integer>
<key>Persistent ID</key><string>DDE0C9F09923E484</string>
<key>Track Type</key><string>File</string>
<key>Location</key><string>file://localhost/Users/renaudg/Music/iTunes/iTunes Music/U2/October/03 I Threw a Brick Through a Window.mp3</string>
<key>File Folder Count</key><integer>4</integer>
<key>Library Folder Count</key><integer>1</integer>
</dict>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden
  • Follow-Ups:
    • Re: Duplicates files in iTunes after running applescript
      • From: Axel Luttgens <email@hidden>
  • Prev by Date: Re: Change the case of file names
  • Next by Date: Re: Duplicates files in iTunes after running applescript
  • Previous by thread: Re: Change the case of file names
  • Next by thread: Re: Duplicates files in iTunes after running applescript
  • Index(es):
    • Date
    • Thread