bradubuntu linux

My experience setting up a computer with Ubuntu linux

11 April 2007

Automatic Random Music Sync

As I was messing around with my laptop last week, I quickly realized that all the major ubuntu music jukebox players don't shuffle music to mp3 players. My mp3 player is only 1 GB, which is much smaller than my music library. In Windows Media Player, I click on the "shuffle" button and it automatically deletes all the music on my player and refills it with a random selection from my music library. I love this functionality in WMP, but there is no current support for this in Rhythmbox or any other of the main music players.

However, I found a random sync script on the internet. There are pretty clear instructions on how to enable the script as well. However, it doesn't do everything I want it to. For example, I don't want to select the source and target directories every time. I want to shuffle from the music folder on my PC to the music folder on my mp3 player every time. So near the top of the script file I added the definitions

tgtPath="/media/TELECHIPS/Music"
srcPath="/media/hdb1/mp3"

Ubuntu recognizes my mp3 player as TELECHIPS, although Rhythmbox correctly recognizes it as a Cowon iAudio U3. Also, my music library is on my second hard drive (hdb1).

Because I define the target and source directories, I had to comment out a few lines in the script for selecting those directories. The script allows for multiple targets and sources, so there were a couple "for" loops to comment out as well. The script does not delete music on my mp3 player, so near the top of the script file I added the line

rm -r /media/TELECHIPS/Music/*

which deletes all files and folders in the Music directory.

So here's how it works right now. I plug in my mp3 player, and it shows up on my desktop. I right click on the mp3 player (or on any folder for that matter) and select "randomsync" from the script menu. A popup tells me how much space is available and asks how much space I want to fill. After I click OK, the auto random sync runs. When finished I right click on the mp3 player and select "unmount". I wait a bit for the actual file transfer to happen, then another popup tells me I can unplug my mp3 player. This is actually easier than using WMP!

0 Comments:

Post a Comment

<< Home