         subalbums: []
         pictures: []
 
-      processAlbum edegalAlbum, parent: parent, albumId: coppermineAlbum.aid, parent: parent
+      processAlbum edegalAlbum, parent: parent, albumId: coppermineAlbum.aid
 
 processAlbum = (edegalAlbum, opts) ->
+  console?.log 'processAlbum', edegalAlbum, opts
   {albumId, categoryId, parent} = opts
 
   getAlbum(edegalAlbum.path).then (existingAlbum) ->

  107 # Animeunioni
]

root =
  path: '/'
  title: 'Anikin kuva-arkisto'
  breadcrumb: []
  subalbums: []
  pictures: []

connection.connect()

query = Q.nbind connection.query, connection

convertCoppermine = ->
  Q.all([
    dropAlbums().fail(-> null)
    query("SET NAMES 'latin1';")
  ]).then ->
    convertSubcategories 0, root
  .then ->
    setThumbnail root

if require.main is module
  convertCoppermine().then ->
    process.exit()
  .done()
