
I needed an MP3 player with plenty on space, and none of the flash memory devices could accommodate. Enter the Ipod Classic. Bought the 160Gb Black knowing that there was Linux support.. How naive of me to think that it would just work...! I settled on Banshee as this suited my needs.. but alas, it was shorted lived.. playlists became a big no-no. I tried other applications, all with the same results. Nothing would either read or write the list to the ipod. GTKPod however, did manage the playlists, but that had it's own issues with track order being impossible.
Being completely sick to the back teeth with constantly battling with Apple's pretty yet crippled player, I bought the Cowon X7 after reading plenty of reviews on it's quality of sound etc. Yep.. frustration endless frustration..
1) Player not detected by any media managers.
(even after quite awhile hacking libmtp-1.0.6 to see the X7)
2) Completely unable to create playlists.
3) Several UI annoyances :(
4) Device become read only if invalid characters are present (corrupted) in the file/folder names. The only way I could fix this was rename my source files, format the device and start again.
Changing the USB to MSC on the device and just rsyncing my music did the trick, but that still didn't fix the playlist issue. Manually knocked up a playlist, which obviously didn't work. After a few hours of scratching my head I managed to fix it.. In short it was the the format of the file. I use VI and stupidly overlooked that it prefers unix not dos format file output. Any playlist created under Linux will need to be converted, this can be done in a couple of steps.
1) Convert the file to dos. I used the command ":e ++ff=dos" from within VI and then saved the file. This works if you manually create the file, if you saved the playlist from say Audacious then you'll need to use unix2dos as there will be no carriage returns (CR) for VI to process.
2) Change the path to the music files to the absolute path to the player ie what it sees not the absolute path including the mount point ie /media/******.
3) Change the directory dividers to Windows format.
4) Use SED to append a '\r' to the end of each line.
sed 's/$'"/`echo \\\r`/"
My local library is /home/cdstealer/Music and the X7 library is /Music, so my playlist was just copied into the root of the players HDD as the paths in the m3u file were relative. If you store your playlists anywhere else ie /Playlists, then the paths in the m3u file need to be absolute.
If using mtp to transfer your playlist, it will be copied into the root of the 2Gb Flash memory and not the HDD. I found this does not work :(
eg to change the directory slashes:
sed -i 's/\//\\/g' cdstealer.m3u
So now I can create playlists with banshee, audacious etc etc and just run the above commands to make them compatible.
I small bash script that could help:
#!/bin/bash
# make an extended playlist from an mp3 directory
echo "#EXTM3U"
for i in *.mp3; do
if [ -e "$i" ]; then
title=`id3v2 -l $i | grep TIT2 | awk -F": " '{print $2}'`
seconds=`mp3info -p "%S" "$i"`
echo "#EXTINF:$seconds,$title"
echo $(pwd | sed 's/home\/cdstealer\///'|sed 's/\//\\/g')\\$i
fi
done
Playlist sorted :)
Also, when adding new music, although there is a menu for listing tracks transferred in the last day/week/month etc, it does not organise then in a useful fashion. You get a list of all the tracks list in alphabetical order (which is pointless IMHO). So the script below that I use for syncing my music will also create a separate playlist for every album.
The downfall to this is, if you a lot of music at once or wipe the device a transfer your entire collection, you WILL have a large amount of playlists!
Transfer/playlist script
Now for the filenames. Both the ipod and X7 use the fat32 file system and as such, they don't handle UTF-8 characters in file/directory names. Because the ipod stores everything in a database, all transferred files/directories are renamed to some string of numbers, so this isn't and issue. But, for the X7, it is drag n' drop and doesn't rely on a database in the same way as Ipod, filenames are vital as they are untouched. I found an easy gui app to do this called "Easytag". A very good all-in-one app that renames the files in dos format, writes the id3tag and embeds artwork into the files.
What I ended up doing is renaming all my MP3 to "TrackXX.mp3". This isn't an issue for me as the X7 and MythTV list everything from tags.
What I have found is EasyTag writes id3 information to the end of the mp3 file, where as id3v2 read/writes from/to the header at the beginning. So this means any files tagged with EasyTag will not be compatible with the id3v2 command.
You could also rename files using the script I found below that will rename anything passed to it to remove any illegal characters. To invoke it (before you transfer to the X7), for example:
To rename your file:
find ~/Music -type f -name "*" | perl fat_rename.pl
To rename your directories:
find ~/Music -type d -name "*" | perl fat_rename.pl
This is the magic:
#!/usr/bin/perl -w
# This script renames all the files supplied as command-line args
# where necessary so that the filename is acceptable to MS Windows
# Cameron Hayne (macdev@hayne.net), June 2004
use strict;
chomp(@ARGV = <STDIN>) unless @ARGV;
# The Microsoft document at
# http://support.microsoft.com/default.aspx?scid=kb;EN-US;100108
# says that the following characters are not allowed in filenames
# in each of the specified filesystems:
# FAT: . " / \ [ ] | : ; , =
# NTFS: ? " / \ < > | : *
# We don't do anything with the dot (.) since it clearly is allowable
# in spite of what that document says.
# And we don't do anything with the slash (/) since that character
# will not occur in OS X filenames and modifying it would cause
# troubles when a file path (with directories) is specified.
# The changing of the filenames is done via the 'tr' statements below.
# Each occurence of a character in the first curly brackets
# is replaced by the character in the second curly brackets.
foreach my $filename (@ARGV)
{
my $orig_filename = $filename;
$filename =~ tr{\\}{-};
$filename =~ tr{*?}{-};
$filename =~ tr{"><[]|:;,=}{-};
unless ($filename eq $orig_filename)
{
print "About to rename $orig_filename to $filename\n";
if (-e $filename)
{
print "Oops, there already exists a file named $filename\n";
print "Skipping the rename - you will have to do it manually\n";
}
else
{
rename($orig_filename, $filename);
}
}
}
But I must admit, after getting used to the UI, the BBE3 sound processor is amazing. And after all, I did purchase this to listen to music. I set my BBE to "user1" and spent quite a while tweaking the sound for my headset and ears.. it does exactly what it says.. very very pleased.