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

Create xb_utils.py [to query/manipulate xklb-metadata.db (schema in xb.py) + iiab-glue.db (schema in glue-db.py)] #256

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

Conversation

deldesir
Copy link
Collaborator

@deldesir deldesir commented Sep 24, 2024

This pull request introduces a new utility module xb_utils.py designed to handle database operations for xklb-metadata.db and iiab-glue.db. The new module will:

  • Query and manipulate xklb-metadata.db schema defined in xb.py.
  • Query and manipulate iiab-glue.db schema defined in glue-db.py.
  • Include functions for database operations such as removing short media entries, fetching requested URLs, calculating views per day, updating playlist paths, and handling media and captions.

The goal of this refactor is to centralize database-related functionalities, improve maintainability, and enhance the overall structure of the codebase. This change builds on and revises the functionality introduced in previous pull requests (#244 and #255).

  • Tested on Ubuntu 24.04

@deldesir deldesir marked this pull request as draft September 24, 2024 17:01
@deldesir deldesir self-assigned this Sep 25, 2024
@deldesir deldesir requested a review from holta September 25, 2024 02:15
@deldesir deldesir marked this pull request as ready for review September 25, 2024 02:15
@deldesir deldesir added the enhancement New feature or request label Sep 25, 2024
@holta
Copy link
Member

holta commented Sep 25, 2024

@deldesir add an explanation on top — so @avni can help review this?

@holta
Copy link
Member

holta commented Oct 14, 2024

"lb_search.py functions needs to be moved to cps/services/xb_utils.py because they are database-related"

So @deldesir will add a 4th commit to move lb search functions (e.g. _merge_captions, _construct_captions_search_query, get_search_terms [to be renamed get_captions_search_results] ) from cps/lb_search.py to cps/services/xb_utils.py

(Essentially building on top of & revising...)

Related:

@holta holta changed the title Create xb_utils.py Create xb_utils.py [to query + manipulate xklb-metadata.db, whose schema is in xb.py] Oct 14, 2024
@holta holta changed the title Create xb_utils.py [to query + manipulate xklb-metadata.db, whose schema is in xb.py] Create xb_utils.py [to query/manipulate xklb-metadata.db (schema in xb.py) + iiab-glue.db (schema in glue-db.py)] Oct 14, 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