mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Implement #734
This commit is contained in:
parent
4fbe9c3fa4
commit
daa604df81
@ -11,7 +11,7 @@ from PyQt4.QtCore import Qt, QObject, SIGNAL, QVariant, \
|
|||||||
from PyQt4.QtGui import QDialog, QItemSelectionModel
|
from PyQt4.QtGui import QDialog, QItemSelectionModel
|
||||||
|
|
||||||
from calibre.gui2.dialogs.fetch_metadata_ui import Ui_FetchMetadata
|
from calibre.gui2.dialogs.fetch_metadata_ui import Ui_FetchMetadata
|
||||||
from calibre.gui2 import error_dialog, NONE
|
from calibre.gui2 import error_dialog, NONE, info_dialog
|
||||||
from calibre.ebooks.metadata.isbndb import create_books, option_parser
|
from calibre.ebooks.metadata.isbndb import create_books, option_parser
|
||||||
from calibre import Settings
|
from calibre import Settings
|
||||||
|
|
||||||
@ -137,6 +137,9 @@ class FetchMetadata(QDialog, Ui_FetchMetadata):
|
|||||||
books = create_books(opts, args, self.logger, self.timeout)
|
books = create_books(opts, args, self.logger, self.timeout)
|
||||||
|
|
||||||
self.model = Matches(books)
|
self.model = Matches(books)
|
||||||
|
if self.model.rowCount() < 1:
|
||||||
|
info_dialog(self, _('No metadata found'), _('No metadata found, try adjusting the title and author or the ISBN key.')).exec_()
|
||||||
|
self.reject()
|
||||||
|
|
||||||
self.matches.setModel(self.model)
|
self.matches.setModel(self.model)
|
||||||
QObject.connect(self.matches.selectionModel(), SIGNAL('currentRowChanged(QModelIndex, QModelIndex)'),
|
QObject.connect(self.matches.selectionModel(), SIGNAL('currentRowChanged(QModelIndex, QModelIndex)'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user