

def item_candidates(self, item, artist, album):
    dir = path.dirname(item.path)
    cues = glob.glob(path.join(dir, '*.cue'))
    if (not cues):
        return
    if (len(cues) > 1):
        self._log.info('Found multiple cue files doing nothing: {0}', map(displayable_path, cues))
    cue_file = cues[0]
    self._log.info('Found {} for {}', displayable_path(cue_file), item)
    try:
        command_output(['shnsplit', '-f', cue_file, item.path])
    except (subprocess.CalledProcessError, OSError):
        self._log.exception('shnsplit execution failed')
        return
    tracks = glob(path.join(dir, '*.wav'))
    self._log.info('Generated {0} tracks', len(tracks))
    for t in tracks:
        title = 'dunno lol'
        track_id = 'wtf'
        index = int(path.basename(t)[len('split-track'):(- len('.wav'))])
        (yield TrackInfo(title, track_id, index=index, artist=artist))

dataset/ETHPy150Open beetbox/beets/beetsplug/cue.py CuePlugin.item_candidates/original