version 0.4.6

This commit is contained in:
Kovid Goyal 2007-09-30 18:01:48 +00:00
parent 976e838d82
commit 3b60b217a6
4 changed files with 6 additions and 6 deletions

View File

@ -13,7 +13,7 @@
## with this program; if not, write to the Free Software Foundation, Inc.,
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
''' E-book management software'''
__version__ = "0.4.5"
__version__ = "0.4.6"
__docformat__ = "epytext"
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
__appname__ = 'libprs500'

View File

@ -41,7 +41,6 @@ def get_metadata(stream):
if info.subject:
mi.category = info.subject
except Exception, err:
raise
print >>sys.stderr, 'Couldn\'t read metadata from pdf: %s with error %s'%(mi.title, str(err))
return mi

View File

@ -113,6 +113,8 @@ class BooksModel(QAbstractTableModel):
def set_database(self, db):
if isinstance(db, (QString, basestring)):
if isinstance(db, QString):
db = qstring_to_unicode(db)
db = LibraryDatabase(os.path.expanduser(qstring_to_unicode(db)))
self.db = db

View File

@ -954,11 +954,10 @@ class LibraryDatabase(object):
(mi.title, uri, mi.series_index))
id = obj.lastrowid
self.conn.commit()
if not mi.author:
mi.author = 'Unknown'
temp = mi.author.split(',')
if not mi.authors:
mi.authors = ['Unknown']
authors = []
for a in temp:
for a in mi.authors:
authors += a.split('&')
self.set_authors(id, authors)
if mi.author_sort: