'Edit metadata of selected books in library in bulk.'

def edit_bulk_metadata(self, checked):

    rows = [r.row() for r in self.gui.library_view.selectionModel().selectedRows()]
    m = self.gui.library_view.model()
    ids = [m.id(r) for r in rows]
    if ((not rows) or (len(rows) == 0)):
        d = error_dialog(self.gui, _('Cannot    edit    metadata'), _('No    books    selected'))
        d.exec_()
        return
    self.do_edit_bulk_metadata(rows, ids)
