'Called once metadata has been read for all books on the device.'

def metadata_downloaded(self, job):

    if job.failed:
        self.device_job_exception(job)
        return
    self.device_manager.slow_driveinfo()
    if DEBUG:
        prints('DeviceJob:    metadata_downloaded:    Starting    set_books_in_library')
    self.set_books_in_library(job.result, reset=True, add_as_step_to_job=job)
    if DEBUG:
        prints('DeviceJob:    metadata_downloaded:    updating    views')
    (mainlist, cardalist, cardblist) = job.result
    self.memory_view.set_database(mainlist)
    self.memory_view.set_editable(self.device_manager.device.CAN_SET_METADATA, (self.device_manager.device.BACKLOADING_ERROR_MESSAGE is None))
    self.card_a_view.set_database(cardalist)
    self.card_a_view.set_editable(self.device_manager.device.CAN_SET_METADATA, (self.device_manager.device.BACKLOADING_ERROR_MESSAGE is None))
    self.card_b_view.set_database(cardblist)
    self.card_b_view.set_editable(self.device_manager.device.CAN_SET_METADATA, (self.device_manager.device.BACKLOADING_ERROR_MESSAGE is None))
    if DEBUG:
        prints('DeviceJob:    metadata_downloaded:    syncing')
    self.sync_news()
    self.sync_catalogs()
    if DEBUG:
        prints('DeviceJob:    metadata_downloaded:    refreshing    ondevice')
    self.refresh_ondevice()
    if DEBUG:
        prints('DeviceJob:    metadata_downloaded:    sending    metadata_available    signal')
    device_signals.device_metadata_available.emit()
