Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Sync more data from iTunes to manually-synced iPods Apps
I have my music and podcasts spread out in different iTunes libraries. So if I sync items, tracks from another library are deleted from my iPod -- therefore I manually manage my tracks. The downside is when you connect a manuall-synced iPod to iTunes, your ratings, played date, counts, etc. don't get synced with the iTunes Library. So I created this simple AppleScript that syncs tracks on specified playlists on your iPod with matching ones in iTunes. I realize other AppleScripts exist to do this already, but I wanted something which required no user input and simply did what would happen if the iPod was in automatic sync mode.

[robg adds: I haven't tested this one.]
    •    
  • Currently 2.00 / 5
  You rated: 1 / 5 (7 votes cast)
 
[8,371 views]  

Sync more data from iTunes to manually-synced iPods | 6 comments | Create New Account
Click here to return to the 'Sync more data from iTunes to manually-synced iPods' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Sync more data from iTunes to manually-synced iPods
Authored by: deleted_user4 on May 07, '07 01:40:30PM
Neat. Used with iPod Launcher ( http://www.macupdate.com/info.php/id/10453/ipod-launcher ) , quite useful.


[ Reply to This | # ]
Sync more data from iTunes to manually-synced iPods
Authored by: squarefrog on May 08, '07 02:29:58AM

Wow this is great! I've always reluctantly used automatic sync to keep my playcounts/ratings in check. This means I've had to uncheck all the music that wont fit on my 20GB iPod.



[ Reply to This | # ]
Sync more data from iTunes to manually-synced iPods
Authored by: PizzaCake on May 12, '07 04:27:04AM

Glad you like it. I've made two small changes to the applescript so that it now also updates skipped count and skipped date. Changes as follows:
1.
from-
set ipodTrackData to {name, artist, album, played date, played count, rating} of ipodTrack
to-
set ipodTrackData to {name, artist, album, played date, played count, rating, skipped count, skipped date} of ipodTrack
2.
add after-
try
set rating of eachFoundTrackInPlaylist to item 6 of ipodTrackData
end try
this-
try
set skipped count of eachFoundTrackInPlaylist to item 7 of ipodTrackData
end try
try
set skipped date of eachFoundTrackInPlaylist to item 8 of ipodTrackData
end try

The whole thing should hopefully look like this:
tell application "iTunes"
set iPodName to ""
set syncPlaylists to {"Music", "Podcasts"}
repeat with syncPlaylist in syncPlaylists
repeat with i from 1 to count of sources
if the kind of source i is iPod then
set iPodName to name of source i as string
set ipodPlaylistId to (first playlist of source iPodName whose name is syncPlaylist)
end if
end repeat
set musicLibraryId to (first playlist whose name is syncPlaylist)
--update every track itunes syncPlaylist with data from ipod syncPlaylist
repeat with ipodPlaylistTracksCounter from 1 to count of tracks of ipodPlaylistId
set ipodTrack to track ipodPlaylistTracksCounter of ipodPlaylistId
set ipodTrackData to {name, artist, album, played date, played count, rating, skipped count, skipped date} of ipodTrack
set foundTracksInPlaylist to (every track of musicLibraryId whose ((name is item 1 of ipodTrackData) and (artist is item 2 of ipodTrackData) and (album is item 3 of ipodTrackData)))
repeat with eachFoundTrackInPlaylist in foundTracksInPlaylist
--use try blocks in case of missing data
try
set played date of eachFoundTrackInPlaylist to item 4 of ipodTrackData
end try
try
set played count of eachFoundTrackInPlaylist to item 5 of ipodTrackData
end try
try
set rating of eachFoundTrackInPlaylist to item 6 of ipodTrackData
end try
try
set skipped count of eachFoundTrackInPlaylist to item 7 of ipodTrackData
end try
try
set skipped date of eachFoundTrackInPlaylist to item 8 of ipodTrackData
end try
end repeat
end repeat
end repeat
end tell



[ Reply to This | # ]
Sync more data from iTunes to manually-synced iPods
Authored by: robg on May 15, '07 04:12:33AM

I've also updated the linked source in the original hint with the updated version.

-rob.



[ Reply to This | # ]
Sync more data from iTunes to manually-synced iPods
Authored by: xSmurf on May 17, '07 10:57:18AM

What happens if the play count, last played, etc are bigger locally then on the iPod, will this script overwrite the local values with the older iPod values?

---
MacBook Pro 2.16Ghz / 2Gb / 100Gb 7200rpm / CD/DVD±RW
PM G4 DP 800 / 1.25gb / 120Gb+80Gb / CD/DVD±RW/RAM/DL
- The only APP Smurf



[ Reply to This | # ]
Sync more data from iTunes to manually-synced iPods
Authored by: PizzaCake on May 17, '07 11:25:54AM

"What happens if the play count, last played, etc are bigger locally then on the iPod, will this script overwrite the local values with the older iPod values?"

Yes, the values from the iPod will overwrite the ones in iTunes. Unfortunately, to synchronize these values would require significantly more complexity.



[ Reply to This | # ]