diff --git a/roles/calibre-web/files/app.db b/roles/calibre-web/files/app.db index 31a8b716a..01c0f0383 100644 Binary files a/roles/calibre-web/files/app.db and b/roles/calibre-web/files/app.db differ diff --git a/roles/calibre-web/tasks/enable-or-disable.yml b/roles/calibre-web/tasks/enable-or-disable.yml index b196176f9..c15fda0da 100644 --- a/roles/calibre-web/tasks/enable-or-disable.yml +++ b/roles/calibre-web/tasks/enable-or-disable.yml @@ -23,12 +23,28 @@ dest: "{{ nginx_conf_dir }}/calibre-web-nginx.conf" # /etc/nginx/conf.d when: calibreweb_enabled +- name: If enabling with Calibre-Web enhanced for large audio/video "books" too, also append onto calibre-web-nginx.conf AND symlink /library/www/html/calibre-web -> /library/calibre-web (WIP) + shell: | + if [ -f {{ calibreweb_venv_path }}/scripts/calibre-web-nginx.conf ]; then + cat {{ calibreweb_venv_path }}/scripts/calibre-web-nginx.conf >> {{ nginx_conf_dir }}/calibre-web-nginx.conf + ln -sf {{ calibreweb_home }} {{ doc_root }}/calibre-web + fi + when: calibreweb_enabled + + - name: Disable http://box{{ calibreweb_url1 }} via NGINX, by removing {{ nginx_conf_dir }}/calibre-web-nginx.conf file: - path: "{{ nginx_conf_dir }}/calibre-web-nginx.conf" # /etc/nginx/conf.d + path: "{{ nginx_conf_dir }}/calibre-web-nginx.conf" state: absent when: not calibreweb_enabled +- name: If disabling, also remove symlink /library/www/html/calibre-web (WIP) + file: + path: "{{ doc_root }}/calibre-web" # /library/www/html + state: absent + when: not calibreweb_enabled + + - name: Restart 'nginx' systemd service systemd: name: nginx diff --git a/roles/calibre-web/tasks/install.yml b/roles/calibre-web/tasks/install.yml index 7f778a38f..7f6644980 100644 --- a/roles/calibre-web/tasks/install.yml +++ b/roles/calibre-web/tasks/install.yml @@ -3,10 +3,9 @@ register: df1 -- name: "Install packages: ffmpeg, imagemagick, python3-netifaces" +- name: "Install packages: imagemagick, python3-netifaces" package: name: - - ffmpeg # 2023-07-15: @deldesir requests this, so usability can be improved! - imagemagick - python3-netifaces state: present @@ -57,7 +56,17 @@ dest: "{{ calibreweb_venv_path }}" force: yes #depth: 1 # 2023-11-04: Full clone for now, to help @deldesir & wider community testing - version: "{{ calibreweb_version }}" # e.g. master, 0.6.20 + version: "{{ calibreweb_version }}" # e.g. master, 0.6.21 + +- name: If Calibre-Web is being enhanced with audio/video "books" too, install additional prereqs (CAN TAKE 3+ MINUTES, WIP) + shell: | + if [ -f {{ calibreweb_venv_path }}/scripts/lb-wrapper ]; then + apt install ffmpeg pipx -y + pipx install xklb + ln -s /root/.local/bin/lb /usr/local/bin/lb + cp {{ calibreweb_venv_path }}/scripts/lb-wrapper /usr/local/bin/lb-wrapper + chmod a+x /usr/local/bin/lb-wrapper + fi - name: Download Calibre-Web dependencies from 'requirements.txt' into python3 virtual environment {{ calibreweb_venv_path }} pip: