def convert_bulk_ebook(parent, queue, db, book_ids, out_format=None, args=[]): total = len(book_ids) if total == 0: return None, None, None has_saved_settings = db.has_conversion_options(book_ids) d = BulkConfig(parent, db, out_format, has_saved_settings=has_saved_settings) if d.exec_() != QDialog.Accepted: return None output_format = d.output_format user_recs = cPickle.loads(d.recommendations) book_ids = convert_existing(parent, db, book_ids, output_format) use_saved_single_settings = d.opt_individual_saved_settings.isChecked() return QueueBulk(parent, book_ids, output_format, queue, db, user_recs, args, use_saved_single_settings=use_saved_single_settings)