Epub Catalog using some former value

Bug #1821968 reported by Katja on 2019-03-27
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

when creating a epub catalog genre-source, header_note_source and merge_source using former value.
e.g.
1) creating a catalog with genre source abc
2) opening preset with genre source xyz which is shown correct, nevertheless genre_source abc will be used
3) creating the catalog again without any changes, genre_source xyz is used

This affects genre-source, header_note_source and merge_source.

To solve that, I used code from initialize in Options:

...\src\calibre\gui2\catalog\catalog_epub_mobi.py in Def options abt row 526
right after:
# Generate specs for merge_comments, header_note_source_field, genre_source_field

added
#kwy change March 2019: similar to initialize as otherwise former value is used

# Init self.merge_source_field_name
self.merge_source_field_name = ''
cs = unicode(self.merge_source_field.currentText())
if cs > '':
    merge_source_spec = self.merge_source_fields[cs]
    self.merge_source_field_name = merge_source_spec['field']

# Init self.header_note_source_field_name
self.header_note_source_field_name = ''
cs = unicode(self.header_note_source_field.currentText())
if cs > '':
    header_note_source_spec = self.header_note_source_fields[cs]
    self.header_note_source_field_name = header_note_source_spec['field']

# Init self.genre_source_field_name
self.genre_source_field_name = _('Tags')
cs = unicode(self.genre_source_field.currentText())
if cs != _('Tags'):
    genre_source_spec = self.genre_source_fields[cs]
    self.genre_source_field_name = genre_source_spec['field']

Hi @kovidgoyal,
 do you mind to implement this?

Kovid Goyal (kovid) wrote :

The line numbers in your proposed changes dont match current line numbers. Can you update that or post an actual patch file?

Changed in calibre:
status: New → Incomplete
Katja (katjawy) wrote :

Sorry, I added several prints.

keep 494 # Generate specs for merge_comments, header_note_source_field, genre_source_field
Insert my code at row 495
Before: Checked = ''

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: Incomplete → Fix Released
Katja (katjawy) on 2019-03-29
Changed in calibre:
status: Fix Released → In Progress
Katja (katjawy) wrote :

Hi @kovidgoyal,
The code is added too late and will not solve the issue.
It must before the three rows with «opts_dict ...

Please move new row 508 till 528
To row 501

Kovid Goyal (kovid) wrote :

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers