Pixelastic

You can cut our wings but we will always remember what it was like to fly.

Posts tagged with "Sansa"

Sansa Clip+ folder merging issue

I own a Sansa Clip+ as my mp3 player. It's really small, has great audio quality and combined with a 32Go microSD card plus the internal 8Go, it's enough to hold almost all my music library.

As with any mp3 player realeased nowadays, you can browse your files using mp3 tags. I don't really like it and feel limited in my browsing. As I'm listening to a lot of movie soundtracks I have a pretty long list of artists with only one song attached.

Fortunatly, the Sansa also allows you to browse by folders, which is rare enough to be highlighted.

So far so good. Except that I've discovered a little bug a few days ago in the way folder navigation is done.

I had two folders named Soundtrack - Games and Soundtrack - Movies. Each were holding a dozen albums. In each of those folders I had subfolders sharing the same prefix, like Hitman Contracts, Hitman Blood Money or Kill Bill and Kill Bill volume 2.

When browsing my music folder on the Sansa I noticed that the Soundtrack - Games folder had disappeared. I check the SD card in my computer, and it really was there.

I finally discovered that all the Sountracks - Games content had been merged in Soundtracks - Movies resulting in one big directory instead of two smaller ones.

My second discovery was that all my Hitman sub folders were also merged into Hitman Contracts, and my Kill Bill music was in Kill Bill volume 2.

It seems that when multiple directories shared the same prefix, all folders will be merged in one whose name is the last in alphabetical order.

I'm not the only one in this case, I saw a similar report on Sandisk forums, but the bug seems erratic. Folders does not always get merged if sharing a prefix.

As a temporary fix, waiting for a regular fix in a firmware update, I'll update my folder tree to use Soundtracks/Games/Hitman/Contracts and Soundtracks/Movies/Kill Bill/Volume 1 but this is far from optimal.

Working on Wednesday #8 : Custom zsh scripts for housekeeping

I made a break of the Ruby/Rails learning this week. Instead I learned a bit more about the basic Linux command, and made a few scripts to help me in my day to day work (and fun) with my Linux environment.

I currently use two laptops. One is a tiny netbook while the other a Dell XPS. I mostly use the XPS for everything work related (like posting this), while the netbook is dedicated to casual use : browsing, playing, etc.

Last week, during my vacations, I only took the netbook with me, and while not strictly speaking working on it I still had to code a little bit. I installed ScummVM, CortixTH and managed to run Carmageddon 2 under wine. I also downloaded and tried a few old emulator games on my Dingoo.

As you may have guessed, I wrote a bunch of scripts during that week to help me in some of the more tedious aspects of this task.

Dingoo deployment

Downloading roms, copying them to the Dingoo, and then testing the games to make sure they are working was tedious. I wrote a little script that automatically mount the Dingoo when plugged to the computer, and copy my games to it, removing old version along the way while still keeping my saved games.

I had to parse dmesg (thanks to grep, tail and sed) as well as use rsync for the copy.

Sansa Clip cleaning

I also wrote a simple script to clean my Sansa Clip of all the useless files I had put on it. As I only have a text screen, I don't need the jpg covers, torrent txt files, auto-generated m3u files and other thumbs.db and .DS_Store useless files.

Here, find to the rescue with some zsh scripting, and here we go.

Shared config files

As I'm working on several computers (two laptops and the one at work at least), I found myself spending time reconfiguring stuff multiple times.

Here, thanks to Dropbox and some clever ln -s calls, I managed to replicate the same config on the 3 machines easily.

From my freelance time, I also have a pretty big /etc/hosts and ~/.ssh/config file. At work, I have another one for the work servers. But I sometimes had to connect to the work server from home.

So once again, thanks to Dropbox, some ln -s once more and cat I wrote two functions to regenerate those two files based on config files. That way, whenever I change one of those files, it is updated on the other machines too.

That was it. It took most of my day.

Being able to script those little repetitive tedious task is something I really appreciate on Linux. I am no longer dependent on the UI my OS gave me, and can now really understand how things work. It requires some time to learn, but this is not going to drastically change from one version to another like it does on each Windows new release.