mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Die evil bugs.
This commit is contained in:
parent
9df5c2a489
commit
a456fa8f74
@ -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.3.87"
|
__version__ = "0.3.89"
|
||||||
__docformat__ = "epytext"
|
__docformat__ = "epytext"
|
||||||
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
|
__author__ = "Kovid Goyal <kovid@kovidgoyal.net>"
|
||||||
__appname__ = 'libprs500'
|
__appname__ = 'libprs500'
|
||||||
|
@ -821,8 +821,7 @@ class LibraryDatabase(object):
|
|||||||
self.conn.commit()
|
self.conn.commit()
|
||||||
|
|
||||||
def set_series_index(self, id, idx):
|
def set_series_index(self, id, idx):
|
||||||
print
|
self.conn.execute('UPDATE books SET series_index=? WHERE id=?', (int(idx), id))
|
||||||
self.conn.execute('UPDATE books SET series_index=? WHERE id=?', (idx, id))
|
|
||||||
self.conn.commit()
|
self.conn.commit()
|
||||||
|
|
||||||
def set_rating(self, id, rating):
|
def set_rating(self, id, rating):
|
||||||
@ -853,6 +852,8 @@ class LibraryDatabase(object):
|
|||||||
uri = uris.next()
|
uri = uris.next()
|
||||||
except StopIteration:
|
except StopIteration:
|
||||||
uri = None
|
uri = None
|
||||||
|
if mi.series_index is None:
|
||||||
|
mi.series_index = 1
|
||||||
obj = self.conn.execute('INSERT INTO books(title, uri, series_index) VALUES (?, ?, ?)',
|
obj = self.conn.execute('INSERT INTO books(title, uri, series_index) VALUES (?, ?, ?)',
|
||||||
(mi.title, uri, mi.series_index))
|
(mi.title, uri, mi.series_index))
|
||||||
id = obj.lastrowid
|
id = obj.lastrowid
|
||||||
|
Loading…
x
Reference in New Issue
Block a user