-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add configurable auto-conversion on upload #3020
base: Develop
Are you sure you want to change the base?
Add configurable auto-conversion on upload #3020
Conversation
e5f9a41
to
84fe4f2
Compare
Hey, I'm trying to implement this on my existing install and keep getting the below. Running current master under the linuxservers docker image. Any thoughts?
|
Looks like I missed the case where the new config is unset. 665056c should cover it. |
That looks to have resolved it! Thanks for the quick turnaround. Any thoughts on potentially allowing the convert formats to be a multiple choice? Example is Kindle and iBooks where the former wants MOBI while the latter (appears to) perform(s) better with EPUB. |
Sorry for leaving you on read so long. I've updated the config field to accept a comma-delimited list of formats. I tested with auto-conversion to epub and pdf (from mobi) on my system and both jobs queued successfully. |
Confirmed that this works, and works beautifully. Now we just need to get it merged in. hint hint maintainers :) |
@OzzieIsaacs I've been using this feature for a couple months now without issue. What would it take to get the PR merged into master, or at least a feature branch parallel to the current master? |
@subtlepseudonym Love that you've done this patch, Connor, and hope it will be incorporated into the master at some point. Until then, I was wondering if you might be able to point me (a git novice...or less) toward a good reference on how to incorporate your auto convert into my local instance of calibre-web, which I've had running for years and which was installed via docker compose. Thanks for any info you can provide! |
I'm running v0.6.21-ls257 via linuxserver, but on other versions, your mileage may vary.
Let me know if you run into any trouble. Dockerfile patchdiff --git a/Dockerfile b/Dockerfile
index e53f1c5..27467a3 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -11,6 +11,7 @@ ARG CALIBREWEB_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="notdriz"
+COPY ./calibre-web.tar.gz /tmp/calibre-web.tar.gz
RUN \
echo "**** install build packages ****" && \
apt-get update && \
@@ -33,9 +34,6 @@ RUN \
CALIBREWEB_RELEASE=$(curl -sX GET "https://api.github.com/repos/janeczku/calibre-web/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
- curl -o \
- /tmp/calibre-web.tar.gz -L \
- https://github.com/janeczku/calibre-web/archive/${CALIBREWEB_RELEASE}.tar.gz && \
mkdir -p \
/app/calibre-web && \
tar xf \ |
@subtlepseudonym Thanks very much for your instructions, Connor! I should be able to take some time this evening to do the build. |
Add configurable auto-conversion on upload
This change adds a step to the upload process that kicks off a conversion task if
config_auto_convert_to_format
is set to a valid format. To make configuring this relatively easy, a dropdown has been added to Basic Configuration>Feature Configuration, populated by Allowed Upload Fileformats.It's been noted in an issue comment that this functionality may be slated for eventual inclusion as a plugin rather than the implementation given in this patch. If that's the case, I'm happy to close this PR.
Relevant Issues