-
Notifications
You must be signed in to change notification settings - Fork 5
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
Query captions/subtitles [e.g. video transcripts] from xklb-metadata.db #244
base: master
Are you sure you want to change the base?
Conversation
Function to search through subtitles in xklb-metadata.db. The video titles returned as results are used to enhance Calibre-Web's simple search.
Should this PR be tested more broadly while comparing it to PR #152 now, as suggested at... ? (Or is this PR still a draft for good reason?) |
It's still a draft. Trying to emulate xklb's internals here but my tests aren't conclusive yet due to a misunderstanding of how fts works. I am refactoring this completely to mirror (steal) xklb's code, then will remove the features we don't want for simplicity sake. Worth it as I am learning a lot by doing this. |
Ready for testing. |
This PR doesn't run any command in the background to get its results output to STDOUT, #152 runs a command.
No, as explained in #197 , this PR only searches xklb-metadata.db. Completeness is assured by calibre-web internal search which merges its own results with this PR's ones. |
I will test later on Today. |
This PR code does not execute any subprocess calls or run any external commands, #152 does. This PR is focused on querying and processing data within xklb-metadata.db, manipulating dictionaries, and formatting time strings. The code is designed to interact with captions and media information. It return titles of media where captions match a search term. This PR's approach is preferred because all operations are handled in-memory within Python without invoking any subprocesses (#152 invokes a subprocess to run |
After running PR#259 |
Can you do |
root@box:/usr/local/calibre-web-py3# git status You have unmerged paths. Unmerged paths: Untracked files: no changes added to commit (use "git add" and/or "git commit -a") |
Thanks. I would like to see one more output or screenshot to pin the problem. Open cps/tasks/download.py by running Copy paste these sections. They look like:
A screeshot is ok if copy pasting is not possible |
|
I think I understand what happened. I'll be back with a solution in a couple of minutes. Thanks for your patience. |
It shouldn't be you to do this, but I'll ask you to fix your install with the instructions below. I must tell you the problem was caused by PR #255 proposing unecessary changes for download.py, not because you did something wrong. I understand now the order matters when testing PRs so I did my part by adjusting PR #255 to prevent this issue for others.
|
Indeed! This is a struggle we're currently sorting out, and let's all be patient getting this right! And in future:
|
I have followed your instructions . root@box:/usr/local/calibre-web-py3# systemctl restart calibre-web Oct 19 22:07:10 box python3[2247]: File "/usr/local/calibre-web-py3/cps/init.py", line 42, in |
Ok. Let's call it a failed test for now. On my side, I will be following the instructions step by step to ensure we eat the same food👌. I'll provide some feedback once done to better assist you. Thanks for your hard testing and patience. |
Perfect. Thank you. |
I did the test following the instructions step by step: https://paste.centos.org/view/dc30dfdf You can either do it with a new VM or do it with the current one instead by doing
... and then try the pulls again:
Above instructions worked for me, but it they fail for you, feel free to let me know: |
Just a quick note.I have installed another fresh VM ,this time a 24.10.It worked OK as per above original instuctions.I know @holta had suggested not to use 24.10. |
Am on it now. |
Glad the instructions worked for 24.10. |
|
Update after @deldesir's latest instructions: calibre-web now working OK. Step 6. Also verify if metadata are extended and the media.path is actually a path instead of a URL for the required video — meaning that the download.py refactoring was effective, and functionality is preserved. Step 7.To further test, play a video and note the number in the URL for the video played from within Calibre-Web (e.g. for http://<IIAB_HOSTNAME_OR_IP>/books/read/31.mp4, the video ID is 31). Note also the title of the video, and note the media ID associated with it in iiab-glue.db. Step 8.Find 2 videos with overlapping words in the title, but different captions Step 9.Search for a term that's in the captions of one video but not the other. Only the video where the caption matches should return. NB: I had downloaded more than 2 videos so results may not be as clear as expected,hope that gives an idea. |
Noted. |
Instructions updated to include running PIPX_BIN_DIR=/usr/local/bin pipx install datasette in Step 5. Here are the complete instructions: How to test
|
I will continue steps 6-9 tomorrow. |
I just fixed the instructions for installing datasette in the Test Plan just above:
|
@EMG70, did you get a 404 not found error when testing on 24.04. On my side, when I do the tests on Raspberry PI OS, I could not access Calibre-Web normally. I had to specify the Port 8083 to access it. |
Calibre-Web is now accessible on UNITTEST install on Raspberry Pi OS. All I had to do is:
|
I have not yet tried latest PR tests on Raspberry PI. |
The official/recommended way of doing the above is to run the following as root: (the
(But possibly these 2 variables should be set in /etc/iiab/local_vars.yml first?)
|
🚀 Pull Request Overview:
This is an alternative PR to #152 designed for A/B testing. It allows searching querying xklb-metadata.db. The
video titlesids returned as results are used to enhance Calibre-Web's simple search.cf. https://github.com/chapmanjacobd/library/blob/main/xklb/mediadb/search.py
📋 Checklist:
📌 Testing scenario:
Related to #152
cc @EMG70