View Single Post
Old 03-02-2011, 05:26 AM   #9
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,713
Karma: 6690879
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by kiwidude View Post
But when I put this as a custom column it displays as blank: {identifiers:select(isbn)}


I should have mentioned -- this morning during testing I found that Metadata.format_field did the wrong thing with the identifiers dict. I fixed it, but it isn't in trunk yet.

If you want to test, then add
Code:
=== modified file src/calibre/ebooks/metadata/book/base.py
--- src/calibre/ebooks/metadata/book/base.py	2011-03-01 15:05:18 +0000
+++ src/calibre/ebooks/metadata/book/base.py	2011-03-02 08:50:11 +0000
@@ -595,6 +595,8 @@
             elif key == 'series_index':
                 res = self.format_series_index(res)
             elif datatype == 'text' and fmeta['is_multiple']:
+                if isinstance(res, dict):
+                    res = [k + ':' + v for k,v in res.items()]
                 res = u', '.join(sorted(res, key=sort_key))
             elif datatype == 'series' and series_with_index:
                 res = res + ' [%s]'%self.format_series_index()
The change should appear in trunk tonight.
chaley is offline   Reply With Quote