Sync manually managed iPod played count etc with multiple iTunes libraries

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 manual iPod to iTunes your ratings, played date, count don't get synced with the iTunes Library. So I created a simple applescript that syncs tracks on specified playlists on your iPod with matching ones in iTunes. I realise 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 sync mode.
The applescript:
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} 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
            end repeat
        end repeat
    end repeat
end tell
Mac Mini G4   Mac OS X (10.4.8)   1 GB RAM, ATI 9200 32MB, Samsung 940BW 19" Widescreen TFT LCD monitor

btw if you don't know how to use applescripts. Open script editor, you'll find it in Applications/Applescript/. Open a new window and copy the code in it and press compile. Save as a script and place in your home folder at ~/Library/iTunes/Scripts, create a Scripts folder if it doesn't exist. Alternatively, save as an application, on opening it will do its magic! Make sure an iPod is mounted in iTunes otherwise an error message will pop up.

Similar Messages

  • I recently bought a new computer, downloaded itunes and all my music from the cloud, made a few more purchases on itunes then plugged in my ipod and it wont sync. My ipod is already associated with my itunes account and the computer is authorised...

    I have a new laptop which will not sync my ipod to it. I've registered the computer, this is the only ipod associated with this itunes account. It shows the syncing symbol on the laptop and on the ipod but then when i eject the ipod afterwards the new songs have not transfered or my playlists.

    What you have on your computer is your iTunes library, not an iTunes "account."  The account that is related to iTunes is your Apple ID, which you use to sign in to the iTunes Store and make purchases.  It is also used with iCloud.  iPods (that are not iPod touch) are associated with your iTunes library, not to your Apple ID.
    So, I think you probably just need to set up (or update) automatic syncing for the iPod.  If it's not set up to sync those new songs, iTunes still syncs the iPod, but it syncs nothing
    In iTunes, if the sidebar (along left side of iTunes window) is hidden, from the menu bar, under View, select Show Sidebar.  In the sidebar, the iPod appears under DEVICES, when it is connected.
    Select the iPod in iTunes.  There is a row of buttons, starting with Summary.  Click on Music next to Summary.  This is the iPod's Music screen, where you tell iTunes how to sync songs to the iPod.
    Check the box for Sync Music (if it's not already checked).  If your iTunes music library fits completely on the iPod, you can choose to sync Entire music library.  Otherwise, you can choose to sync Selected playlists, artists, albums, and genres.  On the lists below, checkmark the playlists, artists, albums, and/or genres that you want on the iPod.  When you click Apply, the songs from your selection sync to the iPod.
    One convenient way to set this up (if you can't sync the entire iTunes music library) is to create a new playlist in your iTunes library.  Name it "iPod Songs" (or whatever you want).  Put ALL songs that you want on the iPod on this playlist, including those new songs.  Back on the iPod's Music screen in iTunes, select this playlist under Playlists.  Going forward, to update songs on the iPod, just update that playlist in your iTunes library (add/remove songs).  The next time you connect the iPod (or click the Sync button), iTunes automatically syncs the same changes to the iPod.

  • How do I use your iPhone with multiple iTunes libraries

    Hi, I have my music spread out between 3 seperate Itunes libraries on 3 different profiles on my computer. I have the newest generation Ipod Nano, Ipod Shuffle, and Iphone 4s. My Ipod's are both full, so I've decided to start putting music onto my phone. With my Ipod's, I can plug them into one profile on the computer, download the music on the Itunes library that exists on that profile, then do the same with the other profiles with no issue. However when I try to do this with my phone, It asks me to erase the music I have gotten from one Itunes library and sync with the current library, as soon as I plug it in to a different Itunes on one of the other profiles. I have my Iphone configured with the Manually manage music option, and I still haven't found a way to use my Iphone with multiple music libraries. PLEASE HELP

    http://support.apple.com/kb/PH12113 - If you use manual syncing, you can sync items from more than one iTunes library to your iPod. (You can sync iPod touch, iPhone, and iPad with only one iTunes library.)
    http://support.apple.com/kb/HT1202 - When manually managing content, you can add content from multiple libraries to your iPod or iPad. Even when manually managing music, some content may be available from only one library at time. This includes all content on iPhone and video content on iPod and iPad.
    They seem inconsistent as far as the iPad is concerned but in both articles the iPhone appears to only be able to sync to one library at a time.
    Troubleshooting Home Sharing - http://support.apple.com/kb/TS2972

  • Problem with multiple iTunes libraries!

    I've been using a program called PowerTunes that enables easily switching between libraries. I suspect that it may be the culprit of the multiple iTunes Libraries that I have. It's out of control! I've nested Previous iTunes Folders six layers deep!
    In addition to this weirdness I've also got multiple plist files and temp files. It's a mess!
    When I look at my backup iTunes folder it looks much cleaner. None of the nested folders (pictured above) or the temp files and multiple plist files. Can someone help me to understand this and restore my iTunes library to a normal state??
    I've written the maker of PowerTunes but he's just one guy so who knows when I'll hear back from him. The more overt problems I am having include:
    • losing ratings
    • recently added items disappear
    • when I switch libraries, iTunes wants to rebuild the genius library (every time!)
    Any help at all would be greatly appreciated!!

    I'm noticing that with iTunes 8, iTunes now doesn't keep separate preferences for multiple library locations, which is really crazy. I wonder if it's a bug or if there's a reason they did that. so when you hold option and launch itunes to get to your other iTunes library, this "other" iTunes library is now using the "old" iTunes library's file location. So if you add music to them, then they get all jumbled together and you don't know what's going where.
    I'm thinking this is the cause of what's happening to you. When you "keep music organized" or whatever, who knows where iTunes is putting the stuff now. It's really bad. I'm hoping somebody has a solution, or any ideas.

  • Sync ipad2 with multiple iTunes libraries

    Hi
    I am trying to work out how to sync my ipad2 with two separate iTunes libraries (one for my music, one for my wifes). The libraries are on our windows xp pc.  I can't find any help on the Apple support website. Is this even possible?
    All help gratefully received!
    Thanks
    Apopp

    While you cannot sync with multiple computers or multiple libraries - you can use multiple computers with your iPad if you manually manage music in iTunes. I assume that this should work with multiple libraries on the same computer as well.
    This article explains how to do it.
    Using iPhone, iPad or iPod with multiple computers

  • Home Sharing issue with multiple iTunes libraries

    I'm hoping someone out there has a suggestion to help solve the problem I'm having with the new iOS 4.3 Home Sharing.
    I have an iMac and a MacBook Pro both running the latest system and iTunes versions. Each has an iTunes library with Home Sharing turned on. All works fine between them -- each iTunes library shows up on the other computer's as a shared library. We also have a 2nd gen Apple TV that sees both computers correctly, e.g., both libraries show up under computers on the Apple TV.
    The problem is with my iPad and 4th gen iPod touch. Both have been updated to 4.3. I signed in to Home Sharing in the Music setting without a problem. Everything is on the same local WiFi network. The problem is that only one of the iTunes libraries shows up as a Shared Library. And it's not consistent as far as which one shows up, the laptop or the iMac. Sometimes it'll be one, sometimes it's the other. Never is it both of them so I can select which one I want to access. This doesn't really make sense to me, as they both do show up on the Apple TV. Both of my iOS devices have this problem. Is it really supposed to function this way?
    Any suggestions?

    I'm glad to hear that it's not just me. I have iTunes libraries on a Mac Mini and on my Macbook. They show up in the shared section in iTunes on the opposite machines, as well as on my 2nd Generation Apple TV. They even show up in the Remote app on my iDevices. However, only one shows up in the iPod music app on the iPhone 3GS and iPad, as well as the iPad video app.
    Hopefully, this gets fixed soon. I keep my podcasts on my Macbook and that's the library that's not showing up on the iDevices iPod app.

  • How can I sync my iMac & iPod Touch calendar & contacts with new iTunes?

    I have just installed the latest iTunes to my iMac. My iPod Touch has iOS 6.0.1. My iMac has OS 10.6.8. I sync by Wi Fi via iCloud. My calendar and contacts are not syncing by Wi Fi between the two, although my mail is. I What should I do?

    This says that it can't be done.
    But I am able to do it for my calendars in iCloud, just not for my contacts in iCloud.
    What is the reason for the difference.

  • Problem with iOS 4.3 Home Sharing with multiple iTunes libraries

    I posted this in another thread, but because there seemed to be a number of issues going on there, I decided to start another thread to see if anyone else is having this problem.
    I have a Mac Mini and a Mac Pro on my network. My iPad can see the iTunes library on each of them, but not both at the same time. If iTunes is running on both computers when I start the iPod or Videos apps on the iPad, only the Mac Pro library will show up in Shared libraries. To get the iPad to recognize the iTunes library on the Mini, I have to shut down iTunes on both the Mini and the Mac Pro, then start iTunes on the Mini. Naturally it also works if I have iTunes running only on the Mini when I start the iPad up. Anyone else seeing this behavior?

    Ok, I think I have tracked down the reason this is happening and I have also found a solution to the problem.
    Cause:
    If you copy your itunes music library from one machine to another using the finder (copying the directory ~/Music/iTunes) you will have 2 machines sharing the same library ID. This appears to cause the ipad and iphone running ios 4.3 to be unable to distinguish the 2 libraries and it ends up showing just one of them.
    Solution:
    Use this KB (http://support.apple.com/kb/HT1451) to force itunes to rebuild your itunes library. This have resolved the problem for me and I can now see all 3 copies of my itunes library at the same time.
    OBS!
    Be aware that if you follow this solution you and you are syncing a IOS device against the library you are rebuilding the IOS device will do a full re sync since it believes the library to be a new one.
    -Ivar

  • Issues with multiple iTunes libraries!

    I recently got asked to add some music to a friend's iPod, so I read how to create a new iTunes library. I did this and it all worked well, only I have lost my own library. The most recent "Previous iTunes Library" I have is from the 28-02-2012, and so I opened this, went through and re-added all the songs I had downloaded after that date to this library. I thought it was all fine but now every time I open up iTunes now it only has songs up until the 28-02-2012! Why is it doing this and how can I fix it! Thanks!

    I'm noticing that with iTunes 8, iTunes now doesn't keep separate preferences for multiple library locations, which is really crazy. I wonder if it's a bug or if there's a reason they did that. so when you hold option and launch itunes to get to your other iTunes library, this "other" iTunes library is now using the "old" iTunes library's file location. So if you add music to them, then they get all jumbled together and you don't know what's going where.
    I'm thinking this is the cause of what's happening to you. When you "keep music organized" or whatever, who knows where iTunes is putting the stuff now. It's really bad. I'm hoping somebody has a solution, or any ideas.

  • Manually Managed Ipod - Syncing Play Count with Itunes Library

    I've had a 80gb 5th Generation Classic for 7 years or so, ive always manually managed it. Now that i've bought an iphone 5 with enough storage for my itunes library i want to transfer my music onto my new phone, so i don't need to carry round an ipod and iphone!
    However my play counts in my library are all very low as i don't play music on my laptop too often.
    Is there a way to get the play counts off my manually managed ipod on to my laptop to put on my phone? I would really like to continue my play counts from my ipod to my iphone.
    Much appreciated.

    Hey, apologies for not getting back sooner, ive been working away.
    I've just tried the script out and i appear to be having some issues.
    When i script more than a handful of songs (15+ ish), i get the following error:
    Line: 136
    Char: 53
    Error: The track is not modifiable
    Code: A0040203
    Source (null)
    and consequently none of the stats are transferred over.
    If i script in small batches i seem to be able to script and also focus in on the song that appears to be causing the issue, and the error pops up again when i only script the suspect song. However the stats also get scrpted over from the song. I then pick the next 10 songs or so and script and carry on. With over 7500 songs this is a long long exercise.
    Do you know any reason for the above error, and is there anything to solve it?
    I must point out im scripting from my iphone 5. My ipod was left at work so ill try that tomorrow night. The itunes version im using is the latest build, 11.0.0.163
    Cheers.

  • Saving iPod play counts when reformatting

    I have a windows formated 60 GB 5G iPod that I want to reformat to Mac. Problem is I have been accumulating play counts for well over a year and I don't want to reset them. I've been managing my music manually, so the play counts don't update in my library. If I created a playlist in my library that's the same as my iPod and synced my iPod with that playlist, would the play counts transfer from the iPod to the playlist or from the playlist to the iPod? Is there any other possible way to save play counts?

    Not a very elegant solution, but for Macs you can use Apple Scripts and there are a couple that allow you to change the playcounts of iTunes stuff either by entering the play count directly or adding/subtracting a number from the current playcount. You can find these at Doug's Apple Scripts for iTunes (do a web search).
    So what you would need to do is on the Windows machine, select all and do a copy, then past into a spreadsheet. Everything should line up nicely in columns. Make sure Play count is there. Save it.
    When you get to the Mac, you can use this list (printed out if you like) and those Apple scripts to set the playcounts back to where they were. Ya, tedious manual method, but I don't know of another way.
    Patrick

  • Manually manage music on two computers with iPhone 4s

    For the past few months I have had not issues manually managing my ipod touch on two computers. This is a necessesity as I own a mac laptop but like to listen to audiobooks from my local library which will only download to a PC. With my iPod touch all I had to do was make sure that the manually manage music was turned on and I could put the music from my computer on the device than go and use my friend's pc to put on the audiobooks (WMA Overdrive format). Since getting the iPhone 4S it has been a nightmare to get the same result. I even went so far as to plug it into each computer completely when nothing was on the iphone and turn on manually manage music in each, than put all my music from the mac on it. Only to find that when I opened up itunes in the PC manually manage music was unchecked again. The only way to turn it back on is to sync and erase all my music, thus forcing me to carry around both an ipod and an Iphone, which is more than a little annoying.
    Please help!

    Unlike the iPods, including the iPod Touch, iPhones will synch with ONLY ONE iTunes library at a time.  You will NOT be able to manually manage music from 2 computers with your iPhone.

  • Ipod play count is incorrect - solution?

    Hey everyone,
    I've been noticing EXTREMELY high play counts for my songs and it has to do with ipod syncs. Every time I plug in my ipod it adds all my computer library play counts to the ipod play counts and it doesn't just add the new ones that occured since my last sync, but all computer play counts EVER! so it double, triple, quadruple counts the computer play counts b/c of each sync.
    Does anyone know if there is a way to fix this so it stops messing up the play count? Or does anyone know how to stop it from syncing computer and ipod plays in general?
    thanks! =D

    I have the same issue with my touch and it's really annoying. What I've noticed is that the play count is added to itself and then incremented. For instance I just played a song that had a play count of 7 once and then it became 15. The songs I've listened to twice will have a play count of 3, songs that Iv'e listened to 3 times will become 7 and so on.

  • How do you manage Playlists on a manually managed iPod Classic?

    I'm going to get an iPod Classic since I have a huge music collection.
    Most of this music is not in iTunes, and won't fit on my computer.
    I have read that I can set iTunes to "Manually manage music and videos" for the device.
    Then I can simply drag and drop music onto the iPod from the Finder (e.g. from an external drive).
    But I also want Playlists on the iPod.
    (Not the songs in iTunes on some playlist -- just the listing of some songs.)
    Can I compose playlists (that reference the MP3 files I am downloading) in some fashion,
    and then drag them over to the iPod, and have it recognize them as playlists for the music
    files that I have dragged onto the iPod?
    I am imagining this would involve creating/editing some XML files with some magic names
    or extensions and dropping them onto the iPod.  (Or, when I do this "Manually manage..."
    thing and go into the device via Finder, will I see a folder there named "Playlists" or something?)
    Something like that?
    How do you manage Playlists on a manually managed iPod Classic?
    (I'm on Mavericks on the computer, of course.
    I could boot Windows or Linux if needed.)

    I have just found out how to do this:
    Connect your iPod:
    Under DEVICES you will see an arrow (on the left hand side, next to your IPod. If you are unable to display your songs the arrow will be pointing to the right. By clicking on this arrow it will point down, all of your songs will appear. Under Preferences uncheck Auto Sync then you can manually add / delete.

  • Trouble Manually Managing iPod

    After upgrade to Leopard from Tiger, trying to manually manage iPod 30GB. I have tried either "sync only checked songs" "Manually manage" or both, but unchecked items remain on iPod. Also, I am trying to sync my wife's 1GB Shuffle either in her account with Shared music or in my account with a separate library. Songs I put in my Drop Box do not appear in iTunes under her account or in her Drop Box. When I use my account but a new library, I add music to her Library from mine, but songs will only go to Shuffle when I check Autofill.
    I am open to suggestions.
    Thanks!

    After searching through more help files, I tried a few more things; 30GB: checked Sync only checked songs & Manually Manage. Shuffle: Manually Manage was not a choice, but the help file instructed me to drag the songs we wanted from the library to the Shuffle.
    I hope I can recreate what I did, because these steps seemed to work.

Maybe you are looking for