'Edit metadata of selected books in library.'

def edit_metadata(self, checked, bulk=None):

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