Index: kphotoalbum/XMLDB/FileReader.cpp
===================================================================
--- kphotoalbum/XMLDB/FileReader.cpp    (revision 604131)
+++ kphotoalbum/XMLDB/FileReader.cpp    (working copy)
@@ -97,11 +97,11 @@
     if ( !mediaCat ) {
         mediaCat = new XMLCategory( QString::fromLatin1("Media Type"), QString:
:fromLatin1("video"),
                                     DB::Category::ListView, 32, true );
-        mediaCat->addItem( QString::fromLatin1( "Image" ) );
-        mediaCat->addItem( QString::fromLatin1( "Video" ) );

         _db->_categoryCollection.addCategory( mediaCat );
     }
+    mediaCat->addItem( QString::fromLatin1( "Image" ) );
+    mediaCat->addItem( QString::fromLatin1( "Video" ) );
     mediaCat->setSpecialCategory( true );
     dynamic_cast<XMLCategory*>( mediaCat.data() )->setShouldSave( false );
 }
Index: kphotoalbum/XMLDB/FileWriter.cpp
===================================================================
--- kphotoalbum/XMLDB/FileWriter.cpp    (revision 604131)
+++ kphotoalbum/XMLDB/FileWriter.cpp    (working copy)
@@ -63,9 +63,6 @@
         const QString name = *categoryIt;
         DB::CategoryPtr category = DB::ImageDB::instance()->categoryCollection(
)->categoryForName( name );

-        if ( !shouldSaveCategory( name ) )
-            continue;
-
         QDomElement opt;
         if ( KCmdLineArgs::parsedArgs()->isSet( "export-in-2.1-format" ) )
             opt = doc.createElement( QString::fromLatin1("option") );
@@ -78,15 +75,18 @@
         opt.setAttribute( QString::fromLatin1( "viewtype" ), category->viewType
() );
         opt.setAttribute( QString::fromLatin1( "thumbnailsize" ), category->thu
mbnailSize() );

-        QStringList list = category->items();
-        list += _db->_members.groups(name);
-        list = Utilities::removeDuplicates( list );
+        if ( shouldSaveCategory( name ) ) {

-        for( QStringList::Iterator it2 = list.begin(); it2 != list.end(); ++it2
 ) {
-            QDomElement val = doc.createElement( QString::fromLatin1("value") )
;
-            val.setAttribute( QString::fromLatin1("value"), *it2 );
-            val.setAttribute( QString::fromLatin1( "id" ), static_cast<XMLCateg
ory*>( category.data() )->idForName( *it2 ) );
-            opt.appendChild( val );
+            QStringList list = category->items();
+            list += _db->_members.groups(name);
+            list = Utilities::removeDuplicates( list );
+
+            for( QStringList::Iterator it2 = list.begin(); it2 != list.end(); +
+it2 ) {
+                QDomElement val = doc.createElement( QString::fromLatin1("value
") );
+                val.setAttribute( QString::fromLatin1("value"), *it2 );
+                val.setAttribute( QString::fromLatin1( "id" ), static_cast<XMLC
ategory*>( category.data() )->idForName( *it2 ) );
+                opt.appendChild( val );
+            }
         }
         options.appendChild( opt );
     }
