EPUB Output: Have the GUI use a UUID for package identifier when creating EPUBs

This commit is contained in:
Kovid Goyal 2009-03-27 12:28:15 -07:00
parent ea0ec8293b
commit d14682525c

View File

@ -6,7 +6,7 @@ __docformat__ = 'restructuredtext en'
''' '''
The GUI for conversion to EPUB. The GUI for conversion to EPUB.
''' '''
import os import os, uuid
from PyQt4.Qt import QDialog, QSpinBox, QDoubleSpinBox, QComboBox, QLineEdit, \ from PyQt4.Qt import QDialog, QSpinBox, QDoubleSpinBox, QComboBox, QLineEdit, \
QTextEdit, QCheckBox, Qt, QPixmap, QIcon, QListWidgetItem, SIGNAL QTextEdit, QCheckBox, Qt, QPixmap, QIcon, QListWidgetItem, SIGNAL
@ -272,6 +272,7 @@ class Config(ResizableDialog, Ui_Dialog):
if self.row is not None: if self.row is not None:
self.db.set_metadata(self.id, mi) self.db.set_metadata(self.id, mi)
self.mi = self.db.get_metadata(self.id, index_is_id=True) self.mi = self.db.get_metadata(self.id, index_is_id=True)
self.mi.application_id = uuid.uuid4()
opf = OPFCreator(os.getcwdu(), self.mi) opf = OPFCreator(os.getcwdu(), self.mi)
self.opf_file = PersistentTemporaryFile('.opf') self.opf_file = PersistentTemporaryFile('.opf')
opf.render(self.opf_file) opf.render(self.opf_file)