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

Manage an iPod Shuffle via the Finder and python UNIX
I came across a nifty little python script called, "iPod shuffle Database Builder", or rebuild_db.py, which allows you to take full control of your iPod Shuffle without needing iTunes. It allows you to manage the audio on your Shuffle by using the Finder.

I recently bought an iPod Shuffle to compliment my 20 GB iPod. The Shuffle appealed to me because of its small size and built-in usb connector. I planned on just keeping it in my pocket at all times and being able to copy talk radio shows to it from my computer at home, at work, or anywhere without the hassle of having a cable with me. I was rather disappointed to find out that in Apple's feeble attempt to stop music piracy they also make life a real pain for everyone, especially those with more than one computer.

Say you download an audio file of a radio show and want to quickly put it on your MP3 player. With other players, you just drag and drop it. With the iPod Shuffle, you have to first import the file into the iTunes Library, then drag it to your Shuffle. While annoying, that is not the bad part. The real annoyance appears when you plug your Shuffle into another computer. If the iTunes application is open on the machine (any machine!), the Shuffle will automatically get updated with no warning. And by updated, I mean any audio file that does not appear in the iTunes library of that machine will get deleted.

With my normal iPod, I at least get a warning window asking if it should sync with this new computer. With the Shuffle, there is no way to disable this. All you can do is uncheck a box that says "Open iTunes when this iPod is attached". But if iTunes is already open, it still will delete audio files that don't appear on the machine with no warning. This seems like a serious bug since the Shuffle can also be used as a normal flash drive for transferring files to different machines.

An alternative is to ignore iTunes altogether and use the rebuild_db python script.

To manage your songs manually:
  1. Save the rebuild_db.py script to your Shuffle.
  2. Make an Audio folder on the Shuffle through the Finder. You can call the folder whatever you want, and can actually have any number of folders organized however you wish.
  3. Copy the Audio files you want to listen to on your Shuffle to the Audio folder.
  4. In the Terminal, run the python script. You can do so like this:
    cd /Volumes/NAMEOFSHUFFLE
    ./rebuild_db.py
    
    The script will search for audio files in all folders on the iPod Shuffle, then update the Shuffle's music database files.
  5. Eject the shuffle and listen to the audio.
The next step, which I haven't tried yet, would be to create a Folder Action script that ran the rebuild_db.py script any time you copy or remove a file from the Shuffle. It looks like the GNUpod project, a collection of perl scripts, now also works with the Shuffle. However, I like the rebuild_db.py script because of its simplicity.
    •    
  • Currently 2.57 / 5
  You rated: 4 / 5 (7 votes cast)
 
[24,483 views]  

Manage an iPod Shuffle via the Finder and python | 10 comments | Create New Account
Click here to return to the 'Manage an iPod Shuffle via the Finder and python' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Manage an iPod Shuffle via the Finder and python
Authored by: Tulse on Apr 07, '05 10:14:37AM
But if iTunes is already open, it still will delete audio files that don't appear on the machine with no warning. This seems like a serious bug since the Shuffle can also be used as a normal flash drive for transferring files to different machines.
I don't actually have a shuffle, so I may be speaking out of turn, but I thought one had to specify how much space on the shuffle was devoted to regular flash drive files, and how much was for music. I would be very surprised if iTunes deleted files in the space specified for flash files (although admittedly one can't listen to any audiofiles in this space).

[ Reply to This | # ]
you are correct
Authored by: redjar on Apr 07, '05 12:15:09PM

You are correct, iTunes will not delete files in the "Files" space. It deletes files in the music space. That is why this script is really nice. it allows you to store and organize your music (and data) in the file space and iTunes won't delete it.



[ Reply to This | # ]
Manage an iPod Shuffle via the Finder and python
Authored by: bipto on Apr 07, '05 10:16:59AM

I have to admit I was fairly suprised when I plugged my new Shuffle into my PC after dumping some music on it from my PowerBook and found I had to intialize it. What a pain. Then again, the entire iPod/iTunes Music Store experience is totally slanted towards owners of a single computer.

Anyway, unlike the author's experience, my PC did warn me prior to initializing my Shuffle. Also unlike the author, even though all the music on the Shuffle was on my PC and my Mac, it erased the entire thing.



[ Reply to This | # ]
iTunes for windows does warn.
Authored by: redjar on Apr 07, '05 12:24:13PM

I just plugged the shuffle into my Windows box and you are right. I get the warning:

The iPod "shuffle name" is linked to another iTunes music library. Do you want to change the link to this iTunes music library and replace all existing songs and playlists on this iPod with those from this library? [yes] [no]

I've seen that message on Mac OS X with my 20 GB iPod, but it doesn't show up with my Shuffle.



[ Reply to This | # ]
Manage an iPod Shuffle via the Finder and python
Authored by: oink on Apr 07, '05 10:56:07AM

The author is correct in stating that if iTunes is already running and you plug a shuffle in, you will not get a warning and your song files will be deleted. Also, on your OWN computer, the local song files have to be available to iTunes or else the songs get deleted on the shuffle. You cannot just have the songs on the shuffle! I hate it when efforts are spent making life harder for users.

---
blurred visionary



[ Reply to This | # ]
Manage an iPod Shuffle via the Finder and python
Authored by: pstadelmann on Apr 07, '05 01:24:10PM

Of course, iTunes does put a warning, even if it's already open.



[ Reply to This | # ]
Manage an iPod Shuffle via the Finder and python
Authored by: maguirer on Apr 07, '05 11:31:53AM

My co-worker brought his Shuffle in to work, and when I hooked it up to my PC with iTunes open, it gave me the typical warning. This was with iTunes 4.7.1.



[ Reply to This | # ]
iTunes warning
Authored by: pstadelmann on Apr 07, '05 01:30:18PM

Of course, iTunes does give a warning when you plug the iPod on another computer.



[ Reply to This | # ]
Manage an iPod Shuffle via the Finder and python
Authored by: Pyrrhus on Nov 15, '06 06:07:32PM

Link of Python script is broken. Please update.



[ Reply to This | # ]
Manage an iPod Shuffle via the Finder and python
Authored by: JimAkin on Nov 16, '06 09:44:33AM

Google much? :-)

Here's the first link that turned up in a search on the script's name:

http://shuffle-db.sourceforge.net/

---
Jim

[ Reply to This | # ]