Skip to content

Commit a83b664

Browse files
committed
Merge remote-tracking branch 'upstream/main' into hardcover
2 parents 1c9f730 + 2202698 commit a83b664

File tree

7 files changed

+158
-89
lines changed

7 files changed

+158
-89
lines changed

README.md

Lines changed: 140 additions & 80 deletions
Large diffs are not rendered by default.
7.62 MB
Loading
1.62 MB
Loading

docker-compose.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,19 @@ services:
44
image: crocodilestick/calibre-web-automated:latest
55
container_name: calibre-web-automated
66
environment:
7+
# Only change these if you know what you're doing
78
- PUID=1000
8-
- PGID=100
9-
- TZ=UTC
10-
- DOCKER_MODS=lscr.io/linuxserver/mods:universal-calibre-v7.16.0
9+
- PGID=1000
10+
# Edit to match your current timezone https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
11+
- TZ=UTC
1112
volumes:
12-
- /path/to/config/folder:/config
13+
# CW users migrating should stop their existing CW instance, make a copy of the config folder, and bind that here to carry over all of their user settings ect.
14+
- /path/to/config/folder:/config
15+
# This is an ingest dir, NOT a library one. Anything added here will be automatically added to your library according to the settings you have configured in CWA Settings page. All files placed here are REMOVED AFTER PROCESSING
1316
- /path/to/the/folder/you/want/to/use/for/book/ingest:/cwa-book-ingest
14-
- /path/to/your/calibre/library:/calibre-library
15-
#- /path/to/your/gmail/credentials.json:/app/calibre-web/gmail.json #Optional
17+
# If you don't have an existing library, CWA will automatically create one at the bind provided here
18+
- /path/to/your/calibre/library:/calibre-library
1619
ports:
17-
- 8084:8083 # Change the first number to change the port you want to access the Web UI, not the second
18-
restart: unless-stopped
20+
# Change the first number to change the port you want to access the Web UI, not the second
21+
- 8083:8083
22+
restart: unless-stopped

empty_library/app.db

0 Bytes
Binary file not shown.

root/app/calibre-web/cps/templates/config_db.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ <h2>{{title}}</h2>
1818
</div>
1919
<div class="form-group required">
2020
<input type="checkbox" id="config_calibre_split" name="config_calibre_split" data-control="split_settings" data-t ="{{ config.config_calibre_split_dir }}" {% if config.config_calibre_split %}checked{% endif %} >
21-
<label for="config_calibre_split">{{_('Separate Book Files from Library - DO NOT USE! COMING IN CWA V2.2.0!')}}</label>
21+
<label for="config_calibre_split">{{_('Separate Book Files from Library - DO NOT USE! COMING IN CWA V3.1.0!')}}</label>
2222
</div>
2323
<div data-related="split_settings">
2424
<div class="form-group required input-group">

scripts/cwa_db.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,11 @@ def set_default_settings(self, force=False) -> None:
232232

233233
def get_cwa_settings(self) -> dict:
234234
"""Gets the current cwa_settings values from the table of the same name in cwa.db and returns them as a dict"""
235+
self.cur.execute("SELECT * FROM cwa_settings")
236+
if self.cur.fetchall() == []: # If settings table is empty, populates it with default values
237+
self.cur.execute("INSERT INTO cwa_settings DEFAULT VALUES;")
238+
self.con.commit()
239+
235240
self.cur.execute("SELECT * FROM cwa_settings")
236241
headers = [header[0] for header in self.cur.description]
237242
cwa_settings = [dict(zip(headers,row)) for row in self.cur.fetchall()][0]

0 commit comments

Comments
 (0)