mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
version 0.4.6
This commit is contained in:
parent
976e838d82
commit
3b60b217a6
@ -13,7 +13,7 @@
|
|||||||
## with this program; if not, write to the Free Software Foundation, Inc.,
|
## with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
''' E-book management software'''
|
''' E-book management software'''
|
||||||
__version__ = "0.4.5"
|
__version__ = "0.4.6"
|
||||||
__docformat__ = "epytext"
|
__docformat__ = "epytext"
|
||||||
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
|
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
|
||||||
__appname__ = 'libprs500'
|
__appname__ = 'libprs500'
|
||||||
|
@ -41,7 +41,6 @@ def get_metadata(stream):
|
|||||||
if info.subject:
|
if info.subject:
|
||||||
mi.category = info.subject
|
mi.category = info.subject
|
||||||
except Exception, err:
|
except Exception, err:
|
||||||
raise
|
|
||||||
print >>sys.stderr, 'Couldn\'t read metadata from pdf: %s with error %s'%(mi.title, str(err))
|
print >>sys.stderr, 'Couldn\'t read metadata from pdf: %s with error %s'%(mi.title, str(err))
|
||||||
return mi
|
return mi
|
||||||
|
|
||||||
|
@ -113,6 +113,8 @@ class BooksModel(QAbstractTableModel):
|
|||||||
|
|
||||||
def set_database(self, db):
|
def set_database(self, db):
|
||||||
if isinstance(db, (QString, basestring)):
|
if isinstance(db, (QString, basestring)):
|
||||||
|
if isinstance(db, QString):
|
||||||
|
db = qstring_to_unicode(db)
|
||||||
db = LibraryDatabase(os.path.expanduser(qstring_to_unicode(db)))
|
db = LibraryDatabase(os.path.expanduser(qstring_to_unicode(db)))
|
||||||
self.db = db
|
self.db = db
|
||||||
|
|
||||||
|
@ -954,11 +954,10 @@ class LibraryDatabase(object):
|
|||||||
(mi.title, uri, mi.series_index))
|
(mi.title, uri, mi.series_index))
|
||||||
id = obj.lastrowid
|
id = obj.lastrowid
|
||||||
self.conn.commit()
|
self.conn.commit()
|
||||||
if not mi.author:
|
if not mi.authors:
|
||||||
mi.author = 'Unknown'
|
mi.authors = ['Unknown']
|
||||||
temp = mi.author.split(',')
|
|
||||||
authors = []
|
authors = []
|
||||||
for a in temp:
|
for a in mi.authors:
|
||||||
authors += a.split('&')
|
authors += a.split('&')
|
||||||
self.set_authors(id, authors)
|
self.set_authors(id, authors)
|
||||||
if mi.author_sort:
|
if mi.author_sort:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user