From bd39c9edb4b3514f308bd95b5b631eb80605db25 Mon Sep 17 00:00:00 2001 From: GRiker Date: Fri, 22 Jan 2010 13:17:06 -0700 Subject: [PATCH] GwR fixed colon bug in NumberTranslate --- src/calibre/gui2/catalog/catalog_epub_mobi.ui | 148 ------------------ src/calibre/library/catalog.py | 6 +- 2 files changed, 4 insertions(+), 150 deletions(-) diff --git a/src/calibre/gui2/catalog/catalog_epub_mobi.ui b/src/calibre/gui2/catalog/catalog_epub_mobi.ui index 2d08aeed52..e683c479bf 100644 --- a/src/calibre/gui2/catalog/catalog_epub_mobi.ui +++ b/src/calibre/gui2/catalog/catalog_epub_mobi.ui @@ -13,153 +13,6 @@ Form -<<<<<<< TREE - - - - 20 - 70 - 241 - 21 - - - - Tags to exclude as genres (regex): - - - Qt::LogText - - - true - - - - - - 20 - 100 - 241 - 17 - - - - 'Don't include this book' tag: - - - - - - 20 - 160 - 171 - 17 - - - - Additional note tag prefix: - - - - - - 300 - 70 - 231 - 22 - - - - - - - \[[\w ]*\] - - - - - - 300 - 100 - 231 - 22 - - - - - - - ~ - - - - - - 300 - 130 - 231 - 22 - - - - - - - + - - - - - - 20 - 130 - 241 - 17 - - - - 'Mark this book as read' tag: - - - - - - 300 - 160 - 231 - 22 - - - - - - - * - - - - - - 61 - 20 - 461 - 20 - - - - - 14 - 75 - true - - - - Special Tags for Catalog Creation - - - Qt::AlignCenter - - -======= @@ -237,7 +90,6 @@ ->>>>>>> MERGE-SOURCE diff --git a/src/calibre/library/catalog.py b/src/calibre/library/catalog.py index 6af2a8eb93..dbcf2df679 100644 --- a/src/calibre/library/catalog.py +++ b/src/calibre/library/catalog.py @@ -375,7 +375,10 @@ class EPUB_MOBI(CatalogPlugin): self.text = ''.join(result) else: - number = int(self.number) + try: + number = int(self.number) + except: + return if number > 1000000: self.text = "%d out of range" % number @@ -2449,7 +2452,6 @@ class EPUB_MOBI(CatalogPlugin): for (i,word) in enumerate(title_words): hit = re.search('[0-9]+',word) if hit : - print "library.catalog:CatalogBuilder.generateSortTitle(): translating '%s'" % word translated.append(EPUB_MOBI.NumberToText(word).text) else: translated.append(word)