'Construct the directory name for this book based on its metadata.'

def construct_path_name(self, id):

    authors = self.authors(id, index_is_id=True)
    if (not authors):
        authors = _('Unknown')
    author = ascii_filename(authors.split(',')[0].replace('|', ','))[:self.PATH_LIMIT].decode('ascii', 'replace')
    title = ascii_filename(self.title(id, index_is_id=True))[:self.PATH_LIMIT].decode('ascii', 'replace')
    while (author[(-1)] in ('    ', '.')):
        author = author[:(-1)]
    if (not author):
        author = ascii_filename(_('Unknown')).decode('ascii', 'replace')
    path = (((author + '/') + title) + ('    (%d)' % id))
    return path
