Catalog Json file don't store Title and Format

Bug #1818838 reported by Katja on 2019-03-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

The Title and Format is not stored in the Json file. From bug#1247897 I can sse it works at least in 2013.
I cannot find what changed in the past but now the parent-child coding does not find the pointer from book-Option dialog to the catalog-Option Dialog.
@Kovid, if there is any simple adjustment, I am happy to learn from you.

Otherwise, here is my solution:

...\calibre-3.39.1\src\calibre\gui2\dialogs\ abt row 49
#kwy Mar 2019: call with pointer
#old: pw = catalog_widget.PluginWidget()
pw = catalog_widget.PluginWidget(self)

...\calibre-3.39.1\src\calibre\gui2\catalog\ abt row 30
...\calibre-3.39.1\src\calibre\gui2\catalog\ abt rrow 41
...\calibre-3.39.1\src\calibre\gui2\catalog\ abt row 43
#kwy Mar 2019: call with parent
#old: def __init__(self, parent=None):
def __init__(self, parent):
    self.parent_pointer = parent
    parent = None

...\calibre-3.39.1\src\calibre\gui2\catalog\ abt row 291
#kwy Mar 2019: replace child-call by pointer-call
        for peer in self.parentWidget().children():
            if peer == self:
            elif peer.children():
                for child in peer.children():
                    if child.objectName() == 'format':
                        current_format = child.currentText().strip()
                    elif child.objectName() == 'title':
                        current_title = unicode(child.text()).strip()
current_title = unicode(self.parent_pointer.title.text()).strip()
current_format = self.parent_pointer.format.currentText().strip()

...\calibre-3.39.1\src\calibre\gui2\catalog\ abt row 809
#kwy Mar 2019: replace child-call by pointer-call
#kwy: but avoid confusion when overwriting in GUI with space
#replace all code by
if format:
    index = self.parent_pointer.format.findText(format)
if title:

I take the Archive today and see the Content of calibre/src/calibre/library/catalogs as well in calibre/src/calibre/gui2/catalogs. But in GIT I cannot see catalogs in Gui2 anymore. So everthing seems ok beside the Archive.

I really hope ou like to implement this

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: New → Fix Released
Katja (katjawy) wrote :

thanks @kovid.
Your solution looks much smarter than mine.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers