-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure xklb-metadata.db has live_status and error columns #265
Conversation
Sync with upstream
Proposed to work with: Building on: |
|
Co-authored-by: A Holt <[email protected]>
Co-authored-by: A Holt <[email protected]>
Co-authored-by: A Holt <[email protected]>
Co-authored-by: A Holt <[email protected]>
@deldesir indicates that this PR will need to be changed and use iiab-glue.db because of the DB refactoring that will map books and media. |
@deldesir please make the decision as-final-as-it-can-be today. The description on top of this PR is empty, which is definitely not helpful. So I'm pasting in your private comments from October 8 — as this needs to accelerate:
|
@deldesir I may have misunderstood what you were saying Friday morning? From looking at the code changes, I think the check for the columns/additions is independent of book/media mapping. |
Makes much more sense! Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Patching tube_add did not work. No matter what, error column would not be created because it is being removed from entry when its value is None due to a filtering process.
As a result, the insert method doesn't see the error key and doesn't alter the table schema to include it.
With the latest commit, the add function in db_media.py is modified to ensure the error key is included in entry even when its value is None.
entry = {k: v for k, v in entry.items() if v is not None or k == 'error'}
if entry is None:
return
|
@deldesir Does this
|
Co-authored-by: A Holt <[email protected]>
Co-authored-by: A Holt <[email protected]>
This PR and its companion iiab/iiab#3827 are on the track to be abandoned. 2 days already, still not working as expected due to the complexity of xklb's db operations. PR #259 is adjusted to achieve the same goal. |
ONGOING DEBATE: Are the 4 lines below in PR #259's SQLalchemy approach (in
|
This pull request is related to the creation of
xklb-metadata.db
. Two key columns:live_status
anderror
, are needed to avoid missing columns error. XKLB does not create them upfront, so we take care of this by adding them.There additions are in fact a patch in xklb's
tube_add.py
to ensure we don't have to make Calibre-Web create xklb-metadata.db from scratch using the schema inxb.py
. It also ensures we have key columns ready while leveragin xklb's handling of the database.