Open deldesir opened 1 week ago
The challenge will likely be establishing a primary key (much like a UUID / GUID) for every video-or-similar, cleanly guaranteeing integrity across both databases:
CLARIFS:
/library/calibre-web
— RECAP:
metadata.db
(for "book" and "video" titles, authors, descriptions and not much else!) has a quite fixed schema that we cannot change, as it's a de facto global standard dating back to Calibre's original introduction in ~2006./library/calibre-web/config/app.db
that is tangentially involved here. Though this 3rd DB is really only for (1) usernames/passwords (2) Calibre-Web settings, AND (3) bookshelves (that teachers use to organize books + videos!)Related:
cc: @mabuelhagag, @avni, @codewiz
Related IDEA from @deldesir:
/library/calibre-web/xklb-metadata.db
— so as to better align with @OzzieIsaacs’s upstream Calibre-Web!For metadata.db, according to the calibredb manual, these are the available book fields:
Available fields: author_sort, authors, comments, cover, formats, identifiers, isbn, languages, last_modified, pubdate, publisher, rating, series, series_index, size, tags, template, timestamp, title, uuid
uuid may be a unique identifier for a given book? It may still be helpful to map the relevant columns across the three tables, metadata.db, xklb-metadata.db, app.db to support solving this (i.e., a mini-specification). Foreign keys can be used to map across tables if that is not already being done.
The queries made to xklb-metadata.db return titles to be used as terms to fetch videos records from metadata.db. What if different videos have the same title!