'Set metadata for the book C{id} from the L{MetaInformation} object C{mi}'

def set_metadata(self, id, mi):

    if mi.title:
        self.set_title(id, mi.title)
    if (not mi.authors):
        mi.authors = ['Unknown']
    authors = []
    for a in mi.authors:
        authors += string_to_authors(a)
    self.set_authors(id, authors)
    if mi.author_sort:
        self.set_author_sort(id, mi.author_sort)
    if mi.publisher:
        self.set_publisher(id, mi.publisher)
    if mi.rating:
        self.set_rating(id, mi.rating)
    if mi.series:
        self.set_series(id, mi.series)
    if (mi.cover_data[1] is not None):
        self.set_cover(id, mi.cover_data[1])
