From 702a2030131f6d2c0e73a49d1963e5c3088044f0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 20 May 2010 00:14:14 -0600 Subject: [PATCH] Remove tag_order kludge --- src/calibre/devices/interface.py | 3 +-- src/calibre/ebooks/metadata/__init__.py | 4 ++-- src/calibre/gui2/library/models.py | 3 --- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/calibre/devices/interface.py b/src/calibre/devices/interface.py index df2d5500e4..f71585fad0 100644 --- a/src/calibre/devices/interface.py +++ b/src/calibre/devices/interface.py @@ -293,8 +293,7 @@ class DevicePlugin(Plugin): put the book. len(metadata) == len(files). Apart from the regular cover (path to cover), there may also be a thumbnail attribute, which should be used in preference. The thumbnail attribute is of the form - (width, height, cover_data as jpeg). In addition the MetaInformation - objects can have a tag_order attribute. + (width, height, cover_data as jpeg). ''' raise NotImplementedError() diff --git a/src/calibre/ebooks/metadata/__init__.py b/src/calibre/ebooks/metadata/__init__.py index a1c29be337..6b573a0420 100644 --- a/src/calibre/ebooks/metadata/__init__.py +++ b/src/calibre/ebooks/metadata/__init__.py @@ -258,7 +258,7 @@ class MetaInformation(object): 'series', 'series_index', 'tags', 'rating', 'isbn', 'language', 'application_id', 'manifest', 'toc', 'spine', 'guide', 'cover', 'book_producer', 'timestamp', 'lccn', 'lcc', 'ddc', 'pubdate', - 'rights', 'publication_type', 'uuid', 'tag_order', + 'rights', 'publication_type', 'uuid' ): prints(x, getattr(self, x, 'None')) @@ -278,7 +278,7 @@ class MetaInformation(object): 'isbn', 'application_id', 'manifest', 'spine', 'toc', 'cover', 'language', 'guide', 'book_producer', 'timestamp', 'lccn', 'lcc', 'ddc', 'pubdate', 'rights', - 'publication_type', 'uuid', 'tag_order'): + 'publication_type', 'uuid'): if hasattr(mi, attr): val = getattr(mi, attr) if val is not None: diff --git a/src/calibre/gui2/library/models.py b/src/calibre/gui2/library/models.py index 66ebc4dc53..cb911d4106 100644 --- a/src/calibre/gui2/library/models.py +++ b/src/calibre/gui2/library/models.py @@ -343,9 +343,6 @@ class BooksModel(QAbstractTableModel): # {{{ ans = [] for id in ids: mi = self.db.get_metadata(id, index_is_id=True, get_cover=True) - if mi.series is not None: - mi.tag_order = { mi.series: self.db.books_in_series_of(id, - index_is_id=True)} ans.append(mi) return ans