'Create a new album consisting of a list of items.
The items are added to the database if they don\'t yet have an
ID. Return a new :class:`Album` object. The list items must not
be empty.'

def add_album(self, items):

    if (not items):
        raise ValueError(u'need    at    least    one    item')
    values = dict(((key, items[0][key]) for key in Album.item_keys))
    album = Album(self, **values)
    with self.transaction():
        album.add(self)
        for item in items:
            item.album_id = album.id
            if (item.id is None):
                item.add(self)
            else:
                item.store()
    return album
