Alle Beiträge von fabi

iPod nano and compilations with Rhythmbox

Woah, it took me some time to realize where the problem persisted… solution is at the bottom 😉

Part I – Patching rhythmbox

First, I patched rhythmbox to treat all music files which are in a directory called Various or Various Artists as compilations:

--- plugins/ipod/rb-ipod-source.c.orig	2009-04-14 12:27:50.000000000 +0200
+++ plugins/ipod/rb-ipod-source.c	2009-04-14 12:27:33.000000000 +0200
@@ -486,6 +486,15 @@
 		track->mediatype = MEDIATYPE_AUDIO;
 	}

+	// Sets "Various Artists" and "Compilation" flags if in "Various" folder
+	char* uri;
+	uri = rhythmdb_entry_get_string (entry, RHYTHMDB_PROP_LOCATION);
+	if (strstr (uri, "/Various/") || strstr (uri, "/Various Artists/")) {
+		rb_debug ("Track is in folder for Various Artists, treating as Various Artists compilation on iPod.");
+		track->albumartist = "Various Artists";
+		track->compilation = 0x1;
+	}
+
 	return track;
 }

The patch (which is custom and probably not for everyone) can also be found here. Download it into the rhythmbox source directory and apply it with

patch -p0 < rhythmbox-automatic-compilations.patch

The result is that iPods CoverFlow works much better. Before, I had numerous covers from Unknown (Unbekannt) albums for each music file that had no album id3 tag. Now, all these are grouped in one Unknown album. Note that real compilations which are in folders like Various/Munich Vibes are correctly displayed in CoverFlow as one separate album.

However, another problem arised on my iPod. When I wanted to find a music file by its artist and this artist is in a compilation, then it does not appear in the Music -> Artists (Musik -> Interpreten) list. It can also not be searched by its artist, only by its title.

Part II – iPod setting

Googleing around, I found a thread which solves the solution by one simple setting: Just untick Compilations on the iPod in Settings -> General -> Music menu (Einstellungen -> Allgemein -> Musikmenü).

Now, the artists are listed in the „Music -> Artists“ list and can also be found by search! *Yeha*

What do we learn from that? Apple makes products sometimes complicated because of settings which are supposed to be intuitive. 😉

Successful sync of Nokia E51 with Lightning/Sunbird via Opensync

Yes, it works! The last half a year I didn’t try it because I didn’t need it, but today I felt like it could work again 😉

Installation

  • Debian testing with multisync-tool, opensync-plugin-iceowl (0.22-3), opensync-plugin-syncml (0.22-2) and standard bluetooth setup
  • Mozilla Thunderbird with Sunbird extension (actually: icedove and iceowl – the Debian way 😉 ) – Lightning should also do it
  • Nokia E51 with firmware version 300.34.56

Configuration

Nokia phone

  • Create a new synchronization profile in System -> Synchronization
  • Set Name and Server address to „Opensync“ (can also be named differently, but has to be used consistently)
  • Set server version to 1.1

Computer

Create the according calendars in Sunbird/Lightning: Choose „Remote Calendar“, URL is „file:///home/fabi/.mozilla-thunderbird/mycal.ics“, type „ics“. Be sure to create at least one entry in the calendar so that the file is created.

Get to know the Bluetooth MAC Address of your phone (phone must be set „visible“, not „hidden“):

hcitool scan

Now the opensync stuff comes:

msynctool --addgroup e51
msynctool --addmember e51 sunbird-sync
msynctool --addmember e51 syncml-obex-client
msynctool --configure e51 1     # see sunbird-sync.conf
msynctool --configure e51 2     # see syncml-obex-client.conf
msynctool --sync e51

For me, the problem at the last command was that my E51 said something like „Sending calendar change: 259 of 259“ and nothing more happened. Here I had todo a little hack to make synchronization work. Just run the syncml-obex-client command and after that the sync should work!

syncml-obex-client --sync text/x-vcard Contacts \
    -b [Bluetooth-MAC] 10 --identifier Opensync --wbxml

You have done it 🙂  For questions, don’t hesitate to ask.

Known issues

  • All-day entries are always converted to 00:00-23:59 entries on the receiver upon synchronization
  • If you create tasks on the mobile phone, synchronization fails

Edit: I confused Sunbird with its sibling Lightning – Sunbird is the Thunderbird extension whereas Lightning is the standalone version.

Lenny upgrade hints

Lenny has been out for a few days, so we upgraded one server for the student representation of our university. Not too much trouble. Some things I learned:

  • Make sure that all services are running that were running before, i.e. dump the process list before update and make sure every service is started after update.
  • Before trying to debug some problem, go over all *.dpkg-old and *.dpkg-dist files and update your configurations. A nice way to edit these files is using vimdiff, as described here. Just enter e.g.
    vimdiff /etc/sysctl.conf /etc/sysctl.conf.dpkg-dist
    and it should be easy to get the differences into your file. After each file restart the service you modified (perhaps it is not running 😉 ).
  • If you are using OpenLDAP, watch for this migration info. Otherwise you will get no ldapsearch results.

Thank you Debian team for another smooth start!

F-Spot MergeVersions plugin

For all F-Spot lovers: Here is a plugin which merges versions of photos to their originals e.g. after a database import: click to download

Update: An updated version of this plugin now resides on github. There is also an alternative mentioned here.

Description

This plugin searches through the existing F-Spot database for orphaned versions of photos, i.e. photos that should be versions of other photos but are separate photos.

E.g.:
2008/11/06/img_2333.jpg
2008/11/06/img_2333 (Modified).jpg
appear as two separate pictures, but the „Modified“ one should actually be a version of the first one.

The MergeVersions plugin searches for pictures named „[name] (Modified).jpg“, „[name] (Modified (2)).jpg“ and so on (up to #4) and merges them as versions into a photo called „[name].jpg“ if it exists.

How I got to it

After all the exif time data got screwed up somehow (no idea why), I restored a backup of the photos. But then the times were not correct in F-Spot. As I wanted to clean up my photo directory anyway at some point in time, I went through the painful process of re-importing all photos. Then, of course, the modified versions were not correctly imported. Thus, writing a plugin that kind of does this thing for me.

WordPress + Zenphoto Integration

Update: Inzwischen benutze ich Zenphoto nicht mehr, weil die WordPress Gallerie recht gut geworden ist. Wahrscheinlich funktioniert die Anleitung hier immer noch, wenn nicht, findet sich vielleicht in den Kommentaren ein Hinweis (oder du schreibst einen ;)).

Wollte ich ja schon lange mal schreiben, was hinter diesem Foto-Blog für Technologien stecken. Und weil Tobi grad nachgefragt hat, werd ich das jetzt mal erklären. Meine Anforderungen waren, dass ich eine echte Gallerie haben wollte, durch die man intuitiv browsen kann. Dies konnte mir keine Blog-Software zufriedenstellend lösen, deshalb musste eine Gallerie-Software her. Zenphoto ist eine relativ einfache Gallerie-Software, die nicht so aufgeblasen ist wie z.B. Gallery, aber trotzdem genug kann.

Grundsätzlich besteht das Blog aus ner WordPress-Installation im Hauptordner sowie einer Zenphoto-Installation im /photos Ordner.

Die erste Schwierigkeit ist jetzt, die beiden so zu vermählen, dass sie vom Design her zusammenpassen. Da gibt es aber nach etwas Recherche eine recht gute Anleitung. Nach ein paar Anpassungen hat man auch das Design so hingeschustert, dass es mit den neuesten Versionen von WordPress+Zenphoto gut ausschaut.

Jetzt will man die Bilder noch irgendwie in seinen Blogs einbinden. Hierfür verwende ich parallel zwei Möglichkeiten: Das ZenphotoPress Plugin sorgt dafür, dass man einzelne Bilder komfortabel aus einer Gallerie auswählen und in den Text einfügen kann. Außerdem bietet es ein Widget an, das in der Seitenleiste angezeigt werden kann. Ein kleines WordPress-Plugin von hier zeigt zu einem Album immer eine festlegbare Anzahl an Fotos an, die dann auf das Album linken. Meine angepasste Version davon gibts hier.

Dann hab ich noch ein nettes Plugin installiert, das das Zusammenspiel von WordPress und Zenphoto erleichtert: ZenPhoto Single Sign-On loggt den Benutzer gleichzeitig bei Zenphoto ein, wenn man sich bei WordPress anmeldet.

Bei weiteren Fragen stehe ich gerne zur Verfügung.