'Find the ID of the first EPUB-Free duplicate available
:param ids: List of calibre IDs that might serve as a home.'

def find_a_home(self, ids):

    for id in ids:
        if (not self.db.has_format(id, u'EPUB')):
            return id
            break
    return None
