iiab / calibre-web

:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database
GNU General Public License v3.0
4 stars 5 forks source link

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

Open deldesir opened 2 months ago

deldesir commented 2 months ago

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:

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).

holta commented 2 months ago

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

holta commented 1 month ago

"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: