Jacob Peddicord

Recently in Planet Ubuntu Category

Sneaky Songs

| No Comments

I'm going on vacation (OBX!) in a week, and figured I should probably update my music player (a Sansa Fuze) for the 12-hour ride there. I've had most of it sync'd for a while, but then I noticed that a few songs were missing ReplayGain tags. Oh no! (ReplayGain ensures everything plays at the same volume so your ears don't bleed when switching songs.)

So, there were a few options:

  1. Erase the player and re-sync 3.5 GB of songs.
  2. rsync the changed songs after adding ReplayGain tags
  3. Find which songs on the player were missing ReplayGain tags

The first option isn't very nice on the flash memory, and I figured there was a smarter way to go about things.

The second would have been viable if Banshee hadn't been updating playcount tags in the files, so almost everything had changed anyway.

So I dove into the third. Installed tagtool and started dumping some files. Those with ReplayGain had "REPLAYGAIN" in the output. Easy enough. It took some time, but I came up with the following command:

find . -name "*.ogg" -print -exec sh -c "tagtool --dump \"{}\" | grep -L REPLAYGAIN" \;

It looks through all ogg files (might work for MP3 too), sends them to tagtool, and then checks the output for a lack of "REPLAYGAIN" in which case it prints "(standard input)" after the filename.

So I ran this, sent it to a file, and scanned it for "standard input." Found about 20 songs. Deleted them off of the player, had Banshee re-sync, and things were back to being awesome.

Now I know what you're saying: "Why not just use Banshee's search bar?" Yes, Banshee's search is quite powerful, but unfortunately you cannot yet search by raw tag or replaygain.

/me scurries off to bugzilla

Edit: Bug 624000. Nice number!

More GSoC updates

| 3 Comments

It's been a while. Well, in internet years, anyway. I've made a lot of updates to jobservice and jobs-admin in the past few weeks:

  • service-level settings works
  • sporting a new UI
  • speed improvements
  • tons of bug fixes

I'll let the video do the talking (click the image):

jobs-admin-jul.png

Shoutout to Matthew Paul Thomas who provided the feedback for this new interface. :)

You can see service-level settings in action in the video. It's shown for apport and ufw. There's been a little confusion as to what this actually is, so here's a fancy diagram:

jobs-admin-jul-diagram.png

When you click that shiny "Job Settings" button, a lot of things happen. jobs-admin tells jobservice that settings were requested. jobservice then asks each of the backends if they have any settings on that particular service. Then it goes to SLS, which first looks up an XML file, and then uses that data to parse the actual configuration files. This is all compiled together by jobservice and sent back over DBus to jobs-admin, which renders some GTK widgets with this information. When a setting is changed, jobs-admin sends the changes to jobservice, which sends it back to wherever it came from.

SLS doesn't have anything to do with services themselves, just their configuration. When you start, stop, or look up information on a job, that is all handled by the appropriate backend.

Now, there is a PPA somewhere with these changes to play around with, but I won't link it here (though it isn't hard to find). I'd like to get more things together before there's a call for testing, but I won't prevent anyone from using it.

Also: I upgraded this site to Movable Type 5. Let me know if you notice anything broken. :)

jobs-admin & jobservice new feature: it works!

| 2 Comments

So this week I've hit a semi-awesome milestone with jobs-admin and jobservice: service management works!

On a Lucid system you're now able to start and stop not only System V services, but also Upstart 0.6 jobs.

jobs-admin-1.png

A demo video is available here.

SysV jobs are currently handled using system-tools-backends, though I may look into doing another implementation that doesn't have any external dependencies.

The Upstart 0.6 backend was pretty tricky: Upstart is able to turn the jobs on and off for us, but to disable them we need to edit the config files under /etc/init. It works, though it may need some more through testing to be sure it's all good.

The Upstart 0.10 backend has not been written yet, as 0.10 currently doesn't exist.

Service-level settings still need to be implemented. This will be tricky to do correctly, but I think it will be a valuable feature.

Finally, if you're feeling brave, branch lp:jobservice and lp:jobsadmin to give things a try, though don't expect everything to work as it should. I'll have a PPA ready within a week for testing once things have stabilized.

Feed identi.ca Twitter LinkedIn Launchpad OpenID