'Return a list of albums from `lib` with the same artist and
album name as the task.'

def find_duplicates(self, lib):

    (artist, album) = self.chosen_ident()
    if (artist is None):
        return []
    duplicates = []
    task_paths = set((i.path for i in self.items if i))
    duplicate_query = dbcore.AndQuery((dbcore.MatchQuery('albumartist', artist), dbcore.MatchQuery('album', album)))
    for album in lib.albums(duplicate_query):
        album_paths = set((i.path for i in album.items()))
        if (album_paths != task_paths):
            duplicates.append(album)
    return duplicates
