iiab / calibre-web Goto Github PK
View Code? Open in Web Editor NEWThis project forked from janeczku/calibre-web
:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database
License: GNU General Public License v3.0
This project forked from janeczku/calibre-web
:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database
License: GNU General Public License v3.0
Describe the bug/problem
Calibre-Web currently has apscheduler
for managing various tasks, including format conversions, uploads, and metadata-related activities. While the present job queuing system functions adequately, there's a need to further optimize and adapt this mechanism specifically for download tasks.
The existing job queuing mechanism, for its general functionality and reliability, can be retained and optimized to better accommodate and efficiently manage download-related tasks within the Calibre-Web environment per feature #7.
The following changes are proposed:
To Reproduce
There is no specific bug to reproduce; this issue pertains to code consistency and best practices within the Calibre-Web project.
Expected behavior
By optimizing the current job queuing mechanism specifically for download tasks, the goal is to ensure smoother and more efficient download operations while maintaining the reliability and stability of the existing system.
Environment (please complete the following information):
Additional Context
The intention is to build upon the strengths of the current job queuing system, ensuring it's well-suited for download-related tasks without requiring a complete overhaul. This approach aims to maintain compatibility and stability while improving the efficiency of download task management within Calibre-Web.
Problem Statement:
Calibre-Web is a robust platform designed for managing e-books efficiently. However, users often find the need to organize their personal multimedia content (videos, photos, audios) alongside their digital book collection. Presently, there's no seamless provision to integrate and manage these diverse media types within Calibre-Web.
Proposed Solution:
This expansion to support multimedia content is crucial. By incorporating support for various media formats (videos, photos, audios), users can effortlessly upload, organize, and manage their diverse digital media collections. Ensuring metadata persistence in the database will allow for easy categorization and searching. Additionally, implementing a feature to download videos from popular platforms directly into Calibre-Web would significantly enhance its utility.
Detailed Feature Specifications:
Alternatives Considered:
Describe the bug/problem
The current implementation in editbooks.py
utilizes direct imports from the subprocess
module, which diverges from the consistent practice within the Calibre-Web codebase. To ensure uniformity and maintain code standardization, the file should use the subproc_wrapper.py
as an interface for interacting with subprocesses, for #6.
To Reproduce
There is no specific bug to reproduce; this issue pertains to code consistency and best practices within the Calibre-Web project.
Expected behavior
Refactoring the code in editbooks.py
to utilize the subproc_wrapper.py
should lead to seamless subprocess operations in line with the established code standards.
Environment (please complete the following information):
Additional context
It's recommended to review the code changes thoroughly, ensuring that the substitution from direct subprocess
imports to the subproc_wrapper.py
maintains or improves the functionality without introducing any regressions. The modification should promote uniformity in the codebase and simplify future maintenance tasks related to subprocess interactions.
@deldesir FYI attempting https://www.youtube.com/shorts/Mt187r0Ec9A returned "Invalid YouTube URL"
So I tried bare URL "youtu.be/Mt187r0Ec9A" (which works in a browser).
FWIW it failed with tail -f /var/log/calibre-log
showing the following:
[2023-10-12 20:54:34,980] ERROR {cps.editbooks:338} Subprocess error (return code 1): WARNING: [generic] The url doesn't specify the protocol, trying with http
Importing playlist-less media youtu.be/Mt187r0Ec9A
, --------YB LOG--------\n\n
2023-10-12 20:54:30 - Moving /var/tmp/download.db aside if it already exists.
--------YB LOG--------\n\n
2023-10-12 20:54:30 - Running command: lb tubeadd /var/tmp/download.db youtu.be/Mt187r0Ec9A && lb dl /var/tmp/download.db --video youtu.be/Mt187r0Ec9A
--------YB LOG--------\n\n
2023-10-12 20:54:34 - An error occurred while running the command. Please check /var/log/yb.log for more details.
[2023-10-12 20:54:34,983] INFO {cps.editbooks:364} Subprocess result: (False, "Subprocess error (return code 1): WARNING: [generic] The url doesn't specify the protocol, trying with http\nImporting playlist-less media youtu.be/Mt187r0Ec9A\n, --------YB LOG--------\\n\\n\n2023-10-12 20:54:30 - Moving /var/tmp/download.db aside if it already exists.\n--------YB LOG--------\\n\\n\n2023-10-12 20:54:30 - Running command: lb tubeadd /var/tmp/download.db youtu.be/Mt187r0Ec9A && lb dl /var/tmp/download.db --video youtu.be/Mt187r0Ec9A\n\n--------YB LOG--------\\n\\n\n2023-10-12 20:54:34 - An error occurred while running the command. Please check /var/log/yb.log for more details.\n", '--------YB LOG--------\\n\\n\n2023-10-12 20:54:30 - Moving /var/tmp/download.db aside if it already exists.\n--------YB LOG--------\\n\\n\n2023-10-12 20:54:30 - Running command: lb tubeadd /var/tmp/download.db youtu.be/Mt187r0Ec9A && lb dl /var/tmp/download.db --video youtu.be/Mt187r0Ec9A\n\n--------YB LOG--------\\n\\n\n2023-10-12 20:54:34 - An error occurred while running the command. Please check /var/log/yb.log for more details.\n', "WARNING: [generic] The url doesn't specify the protocol, trying with http\nImporting playlist-less media youtu.be/Mt187r0Ec9A\n")
[2023-10-12 20:54:37,994] ERROR {cps.editbooks:338} Subprocess error (return code 1): WARNING: [generic] The url doesn't specify the protocol, trying with http
Importing playlist-less media youtu.be/Mt187r0Ec9A
, --------YB LOG--------\n\n
2023-10-12 20:54:34 - Moving /var/tmp/download.db aside if it already exists.
--------YB LOG--------\n\n
2023-10-12 20:54:34 - Running command: lb tubeadd /var/tmp/download.db youtu.be/Mt187r0Ec9A && lb dl /var/tmp/download.db --video youtu.be/Mt187r0Ec9A
--------YB LOG--------\n\n
2023-10-12 20:54:37 - An error occurred while running the command. Please check /var/log/yb.log for more details.
[2023-10-12 20:54:37,994] INFO {cps.editbooks:364} Subprocess result: (False, "Subprocess error (return code 1): WARNING: [generic] The url doesn't specify the protocol, trying with http\nImporting playlist-less media youtu.be/Mt187r0Ec9A\n, --------YB LOG--------\\n\\n\n2023-10-12 20:54:34 - Moving /var/tmp/download.db aside if it already exists.\n--------YB LOG--------\\n\\n\n2023-10-12 20:54:34 - Running command: lb tubeadd /var/tmp/download.db youtu.be/Mt187r0Ec9A && lb dl /var/tmp/download.db --video youtu.be/Mt187r0Ec9A\n\n--------YB LOG--------\\n\\n\n2023-10-12 20:54:37 - An error occurred while running the command. Please check /var/log/yb.log for more details.\n", '--------YB LOG--------\\n\\n\n2023-10-12 20:54:34 - Moving /var/tmp/download.db aside if it already exists.\n--------YB LOG--------\\n\\n\n2023-10-12 20:54:34 - Running command: lb tubeadd /var/tmp/download.db youtu.be/Mt187r0Ec9A && lb dl /var/tmp/download.db --video youtu.be/Mt187r0Ec9A\n\n--------YB LOG--------\\n\\n\n2023-10-12 20:54:37 - An error occurred while running the command. Please check /var/log/yb.log for more details.\n', "WARNING: [generic] The url doesn't specify the protocol, trying with http\nImporting playlist-less media youtu.be/Mt187r0Ec9A\n")
# cat /var/log/yb.log
No media found
No media found
# lb --version
2.2.112
Describe the Problem
Currently, in Calibre-Web, the creation and population of bookshelves are manual processes, dependent on user decisions after each upload/download. This manual approach can become time-consuming and less user-friendly, especially when multiple downloads occur.
The proposal is to automate the process of creating and populating bookshelves upon the occurrence of multiple downloads. This automation should streamline the organization of downloaded content and enhance user experience by reducing manual efforts.
Proposed Changes
Expected Outcomes
By automating the creation and population of bookshelves upon multiple downloads, the goal is to significantly reduce manual efforts for users, improving the organization and accessibility of downloaded content within Calibre-Web.
Additional Context
The aim of this proposed change is to enhance the user experience by automating the organization process without compromising user control. This enhancement seeks to minimize the burden on users in organizing downloaded content while allowing for customization and user-defined parameters for automation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.