Die evil bugs.

This commit is contained in:
Kovid Goyal 2007-08-06 03:58:05 +00:00
parent 9df5c2a489
commit a456fa8f74
2 changed files with 4 additions and 3 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.3.87"
__version__ = "0.3.89"
__docformat__ = "epytext"
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
__appname__ = 'libprs500'

View File

@ -821,8 +821,7 @@ class LibraryDatabase(object):
self.conn.commit()
def set_series_index(self, id, idx):
print
self.conn.execute('UPDATE books SET series_index=? WHERE id=?', (idx, id))
self.conn.execute('UPDATE books SET series_index=? WHERE id=?', (int(idx), id))
self.conn.commit()
def set_rating(self, id, rating):
@ -853,6 +852,8 @@ class LibraryDatabase(object):
uri = uris.next()
except StopIteration:
uri = None
if mi.series_index is None:
mi.series_index = 1
obj = self.conn.execute('INSERT INTO books(title, uri, series_index) VALUES (?, ?, ?)',
(mi.title, uri, mi.series_index))
id = obj.lastrowid