~ubuntu-branches/debian/sid/calibre/sid

« back to all changes in this revision

Viewing changes to src/calibre/library/catalogs/epub_mobi_builder.py

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2014-05-14 18:17:50 UTC
  • mfrom: (1.5.10)
  • Revision ID: package-import@ubuntu.com-20140514181750-xyrxqa47dbw0qfhu
Tags: 1.36.0+dfsg-1
* New upstream release:
  - Fixes editing of metadata (Closes: #741638)

Show diffs side-by-side

added added

removed removed

Lines of Context:
584
584
                if field_contents == '':
585
585
                    field_contents = None
586
586
 
587
 
                if (self.db.metadata_for_field(rule['field'])['datatype'] == 'bool' and
 
587
                # Handle condition where bools_are_tristate is False,
 
588
                # field is a bool and contents is None, which is displayed as No
 
589
                if (not self.db.prefs.get('bools_are_tristate') and
 
590
                    self.db.metadata_for_field(rule['field'])['datatype'] == 'bool' and
588
591
                    field_contents is None):
589
 
                    # Handle condition where field is a bool and contents is None,
590
 
                    # which is displayed as No
591
592
                    field_contents = _('False')
592
593
 
593
594
                if field_contents is not None:
1021
1022
        data = self.plugin.search_sort_db(self.db, self.opts)
1022
1023
        data = self.process_exclusions(data)
1023
1024
 
1024
 
        if self.prefix_rules and self.DEBUG:
1025
 
            self.opts.log.info(" Added prefixes:")
 
1025
        if self.DEBUG:
 
1026
            if self.prefix_rules:
 
1027
                self.opts.log.info(" Added prefixes (bools_are_tristate: {0}):".format(self.db.prefs.get('bools_are_tristate')))
 
1028
            else:
 
1029
                self.opts.log.info(" No added prefixes")
1026
1030
 
1027
1031
        # Populate this_title{} from data[{},{}]
1028
1032
        titles = []