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

Refactor download.py #258

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

Conversation

deldesir
Copy link
Collaborator

@deldesir deldesir commented Sep 24, 2024

This pull request refactors the download.py file to improve code readability, maintainability, and performance.

Changes:

  • Refactored code to use SQLAlchemy for database interactions.

  • Use of xb_utils.py to query the xklb-metadata.db database, enhancing the efficiency of metadata extraction and processing.

  • Tested on Ubuntu 24.04

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

holta commented Sep 25, 2024

How was this tested?

Thanks @deldesir!

@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.
  • Submit a YouTube video URL via the “Download to IIAB” button and monitor the “Task” page to check whether downloading is reported or not.
  • On success, verify with datasette to review the extraction with datasette /library/calibre-web/xklb-metadata.db -h 0.0.0.0 -p <PORT_NUMBER> and then point my browser to http:<IIAB_URL>/books:<PORT_NUMBER>. If metadata are extended and the media.path is actually a path instead of a URL for the required video, that means the refactoring was effective and functionality is preserved.

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