Merge from trunk

This commit is contained in:
Charles Haley 2010-10-03 20:35:28 +01:00
commit abccf7b527
4 changed files with 14 additions and 10 deletions

View File

@ -114,7 +114,8 @@ SC_COPYABLE_FIELDS = SOCIAL_METADATA_FIELDS.union(
PUBLICATION_METADATA_FIELDS).union(
BOOK_STRUCTURE_FIELDS).union(
DEVICE_METADATA_FIELDS).union(
CALIBRE_METADATA_FIELDS) - \
CALIBRE_METADATA_FIELDS).union(
TOP_LEVEL_CLASSIFIERS) - \
SC_FIELDS_NOT_COPIED.union(
SC_FIELDS_COPY_NOT_NULL)

View File

@ -108,7 +108,8 @@ def _get_metadata(stream, stream_type, use_libprs_metadata,
base = metadata_from_filename(name, pat=pattern)
if force_read_metadata or is_recipe(name) or prefs['read_file_metadata']:
mi = get_file_type_metadata(stream, stream_type)
if base.title == os.path.splitext(name)[0] and base.authors is None:
if base.title == os.path.splitext(name)[0] and \
base.is_null('authors') and base.is_null('isbn'):
# Assume that there was no metadata in the file and the user set pattern
# to match meta info from the file name did not match.
# The regex is meant to match the standard format filenames are written

View File

@ -181,5 +181,6 @@ class ConvertAction(InterfaceAction):
self.gui.tags_view.recount()
if self.gui.current_view() is self.gui.library_view:
current = self.gui.library_view.currentIndex()
if current.isValid():
self.gui.library_view.model().current_changed(current, QModelIndex())

View File

@ -361,6 +361,7 @@ class BooksModel(QAbstractTableModel): # {{{
self.cover_cache.set_cache(ids)
def current_changed(self, current, previous, emit_signal=True):
if current.isValid():
idx = current.row()
self.set_cache(idx)
data = self.get_book_display_info(idx)