-
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
New xb.py: Possible schema to standardize xklb db's + main operations? [need to align w/ Calibre-Web's metadata.db & app.db!] #253
base: master
Are you sure you want to change the base?
Conversation
Function to get a specific book (which maps to a media entry) for a given caption
While I understand that the name |
"Official" xklb-metadata.db schema, as derived from an IIAB Calibre-Web example, after running
|
Schema currently proposed by this evolving PR, that would be generated with SQLAlchemy:
|
Likewise a 333-line actual
|
@codewiz mentions that he appreciates the "declarative style" of this PR, so that de facto schema(s) are more understandable to all 👍 |
Seeing the schema like this does make it much easier to go through. Thanks @deldesir! Couple of questions:
|
Couple of notes from today's 9/20 call:
|
Technically there is a table for books, but it's in another db (metadata.db). The book_id (books.id) is read from Line 265 in 2f7ae47
We cannot link two databases by joining there tables columns here, book_media_map was done out of the desire to keep a record of book_id with relatioship with media_id from xklb.db.
Since the goal here is to understand and replicate the official schema in order to use it in a declarative form, this needs to be done upstream by the maintainer in relationship with the overall structure of xklb. I guess this is set as it is as a denormalization strategy necessary for xklb functionality around playlists...
This would introduce redundancy since all playlists are computed to populate bookshelves stored in app.db.
The history table might have been generated by using |
I don't understand the reasoning here. Right now, if a media object is in more than one playlist, there will be multiple rows for the same media object in the media table.... |
Great question but can we arrange a bookshelf/playlist design call in coming weeks, to solve these larger questions? e.g. to begin working thru the many tensions between the Short term, I'd ask that we keep focus on individual videos, to solve the actual problem at hand without getting carried away. In other words, first and foremost we should help @deldesir to debug this PR: Working thru the most immediate problems articulated here: And if on the side that forces us to submit a draft proposal as to how portable bookshelves or portable playlists should in fact / eventually work, that's A-OK as an optional bonus, as an early blueprint for future work. 💯 |
+1 on focusing on videos. playlists can definitely come later! |
This pull request introduces a new module,
xb.py
, which proposes a standardized schema for thexklb-metadata.db
database. The objective of this initial experiment is to:xklb-metadata.db
to standardize data handling and storage.xb.py
to facilitate interaction withxklb-metadata.db
.metadata.db
andapp.db
).This update lays the groundwork for future enhancements, aiming to improve data integrity and streamline a better integration of xklb-metadata.db within the Calibre-Web ecosystem. Context for this change can be found in issue #246.