Skip to content
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

Model xklb-metadata.db using SQLAlchemy #259

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

deldesir
Copy link
Collaborator

@deldesir deldesir commented Sep 26, 2024

This pull request aims to model the xklb-metadata.db database using SQLAlchemy to manage media, captions, and playlists information. The new models provide a structured way to interact with the database and support operations such as creating, updating, and querying media and related data.

  • Tested on Ubuntu 24.04

@deldesir deldesir marked this pull request as draft September 26, 2024 02:04
@holta holta added the enhancement New feature or request label Sep 26, 2024
@holta
Copy link
Member

holta commented Sep 26, 2024

  1. What are the fundamental reasons that a blank xklb-metadata.db is (allegedly) needed?

    • Thanks @deldesir for explaining this apparently quite fundamental question!
    • As I'm not understanding yet why this is suddenly (claimed?) to be an urgent priority. 😉
  2. Would this PR be intended to partially replace one-or-both below... ?

@deldesir deldesir changed the title Create xklb-metadata.db using SQLAlchemy Model xklb-metadata.db using SQLAlchemy Oct 10, 2024
@deldesir deldesir requested a review from holta October 14, 2024 20:10
@deldesir deldesir self-assigned this Oct 14, 2024
@deldesir deldesir marked this pull request as ready for review October 14, 2024 20:10
@deldesir
Copy link
Collaborator Author

deldesir commented Oct 14, 2024

  1. What are the fundamental reasons that a blank xklb-metadata.db is (allegedly) needed?

    • Thanks @deldesir for explaining this apparently quite fundamental question!
    • As I'm not understanding yet why this is suddenly (claimed?) to be an urgent priority. 😉
  2. Would this PR be intended to partially replace one-or-both below... ?

This PR does not create a blank database anymore. As explained in the description, it does one thing, modeling xklb-metadata.db. It is based on the experimental PR New xb.py: Possible schema to standardize xklb db's + main operations? [need to align w/ Calibre-Web's metadata.db & app.db!] #253. As for the reason behind creating a blank, it was for convenience. A db with all key columns would prevent missing columns error and avoid the need to add them (altering the db).

PR Begin with blank xklb-metadata.db from template? [w/ key columns added for Calibre-Web videos] iiab#3808 is not relevant anymore, see PR Add xklb-patch script iiab#3827.

@deldesir
Copy link
Collaborator Author

deldesir commented Oct 17, 2024

How to test

  • Pull the PR following How do I test a pull request (PR) ? instructions.
  • Before downloading a video, do ls /library/calibre-web/xklb-metadata.db in your terminal to check for the db existence. If it exists, that means the SQLAlchemy successfully created it, attesting the effectiveness of the database modeling.

deldesir added a commit to deldesir/calibre-web that referenced this pull request Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants