'Walk `self.toppath` and yield `(dirs, files)` pairs where
`files` are individual music files and `dirs` the set of
containing directories where the music was found.
This can either be a recursive search in the ordinary case, a
single track when `toppath` is a file, a single directory in
`flat` mode.'

def paths(self):

    if (not os.path.isdir(syspath(self.toppath))):
        (yield ([self.toppath], [self.toppath]))
    elif self.session.config['flat']:
        paths = []
        for (dirs, paths_in_dir) in albums_in_dir(self.toppath):
            paths += paths_in_dir
        (yield ([self.toppath], paths))
    else:
        for (dirs, paths) in albums_in_dir(self.toppath):
            (yield (dirs, paths))
