diff --git a/src/calibre/gui2/actions/catalog.py b/src/calibre/gui2/actions/catalog.py index 1650c80d70..be6e7bfe60 100644 --- a/src/calibre/gui2/actions/catalog.py +++ b/src/calibre/gui2/actions/catalog.py @@ -56,6 +56,8 @@ class GenerateCatalogAction(InterfaceAction): def catalog_generated(self, job): if job.result: # Problems during catalog generation + # jobs.results is a list - the first entry is the intended title for the dialog + # Subsequent strings are error messages dialog_title = job.result.pop(0) if re.match('warning:', job.result[0].lower()): job.result.append("Catalog generation complete.") diff --git a/src/calibre/library/catalog.py b/src/calibre/library/catalog.py index cd50cf4378..cf02e9b792 100644 --- a/src/calibre/library/catalog.py +++ b/src/calibre/library/catalog.py @@ -1637,7 +1637,10 @@ then rebuild the catalog.\n''').format(author[0],author[1],current_author[1]) title['title_sort'][0:40])).decode('mac-roman')) return True else: - self.error.append( _("No books found to catalog.\nCheck 'Excluded books' criteria in E-book options.")) + error_msg = _("No books found to catalog.\nCheck 'Excluded books' criteria in E-book options.\n") + self.opts.log.error('*** ' + error_msg + ' ***') + self.error.append(_('No books available to include in catalog')) + self.error.append(error_msg) return False def fetchBookmarks(self): @@ -3164,8 +3167,13 @@ then rebuild the catalog.\n''').format(author[0],author[1],current_author[1]) # Add the author tag cmTag = Tag(ncx_soup, '%s' % 'calibre:meta') cmTag['name'] = "author" - navStr = '%s | %s' % (self.formatNCXText(book['author'], dest='author'), - book['date'].split()[1]) + + if book['date']: + navStr = '%s | %s' % (self.formatNCXText(book['author'], dest='author'), + book['date'].split()[1]) + else: + navStr = '%s' % (self.formatNCXText(book['author'], dest='author')) + if 'tags' in book and len(book['tags']): navStr = self.formatNCXText(navStr + ' | ' + ' · '.join(sorted(book['tags'])), dest='author') cmTag.insert(0, NavigableString(navStr))