|
|
Thread Tools | Search this Thread |
01-04-2020, 09:53 AM | #1 |
Enthusiast
Posts: 26
Karma: 10
Join Date: Jun 2019
Device: Kindle
|
Using Calibre server and calibre.db doesn't seem to be adding new titles
TLDRI am an idiot after all and a slight tweak of my service script and crontab enabled me to do everything I wanted.
In case anyone is curious the working service script is: [Unit] Description=calibre content server After=network.target [Service] Type=simple User=craftyclown Group=craftyclown ExecStart=/opt/calibre/calibre-server --auth-mode=basic --enable-auth --port=8082 /home/craftyclown/Calibre/Library/Rich /home/craftyclown/Calibre/Library/Kate /home/craftyclown/Calibre/Library/Sonya /home/craftyclown/Calibre/Library/Mum [Install] WantedBy=multi-user.target and my crontab command to auto add new books is: */15 * * * * calibredb add /home/craftyclown/Calibre/New/Sonya -r --with-library http://127.0.0.1:8082/#Sonya --username Rich --password ?????? */15 * * * * calibredb add /home/craftyclown/Calibre/New/Rich -r --with-library http://127.0.0.1:8082/#Rich --username Rich --password ?????? */15 * * * * calibredb add /home/craftyclown/Calibre/New/Kate -r --with-library http://127.0.0.1:8082/#Kate --username Rich --password ?????? */15 * * * * calibredb add /home/craftyclown/Calibre/New/Mum -r --with-library http://127.0.0.1:8082/#Mum --username Rich --password ?????? .................................................. .................................................. ......................... Afternoon all, So firstly I'm fairly sure I'm being a dummy here, so happy to get that out of the way first Long story short I'm accessing Calibre server via the web ui and it isn't showing any of the new titles I've added recently. I've been using Calibre server for a while but don't often have need to add new titles so this issue could have been there for a while now without me noticing. The last time I was tinkering with Calibre was enabling OPDS access for mine and my other halfs kindles (which works perfectly by the way) I run Calibre on a headless Linux server using the below service script: [Unit] Description=calibre content server After=network.target [Service] Type=simple User=craftyclown Group=craftyclown ExecStart=/opt/calibre/calibre-server --auth-mode=basic --port=8082 --enable-auth --enable-local-write /home/craftyclown/Calibre/Library/Rich /home/craftyclown/Calibre/Library/Kate /home/craftyclown/Calibre/Library/Sonya /home/craftyclown/Calibre/Library/Mum [Install] WantedBy=multi-user.target I've tried restarting the service but that doesn't seem to make a difference. Am I making an obvious mistake here? Cheers Last edited by CraftyClown; 01-04-2020 at 02:40 PM. Reason: After a long afternoon of reading and tinkering I worked out what the problem was. |
01-04-2020, 11:01 AM | #2 |
creator of calibre
Posts: 44,022
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
How are you adding the titles?
|
Advert | |
|
01-04-2020, 11:21 AM | #3 |
Enthusiast
Posts: 26
Karma: 10
Join Date: Jun 2019
Device: Kindle
|
|
01-04-2020, 11:25 AM | #4 |
creator of calibre
Posts: 44,022
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You need to actually add the books to the database for them to show up use calibredb for that, it can connect to a running server. See its help page https://manual.calibre-ebook.com/gen...calibredb.html
|
01-04-2020, 11:33 AM | #5 | |
Enthusiast
Posts: 26
Karma: 10
Join Date: Jun 2019
Device: Kindle
|
Quote:
I had this running automatically before and calibre was somehow pulling them from the afore mentioned directory. I'm probably being stupid once again, but I don't see anything in the calibredb wiki about adding watch folders. Where am I going wrong here? |
|
Advert | |
|
01-04-2020, 11:49 AM | #6 |
creator of calibre
Posts: 44,022
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Auto-add is a facility of the calibre GUI. If you set it up there, the you need to run the server from within the GUI as well not as aseparate service.
|
01-04-2020, 12:01 PM | #7 | |
Enthusiast
Posts: 26
Karma: 10
Join Date: Jun 2019
Device: Kindle
|
Quote:
I have never used the Calibre GUI as everything is located on a headless server, however my books have always been added automatically. How on earth did I have this working before? Maybe I misunderstood your last comment? Are you saying that setting some kind of watch folder system isn't supposed to be possible with calibre server? |
|
01-04-2020, 12:09 PM | #8 |
Enthusiast
Posts: 26
Karma: 10
Join Date: Jun 2019
Device: Kindle
|
Well I must have completely misunderstood!
I have just got it working again by removing --auth-mode=basic and --enable-auth from my service script. The second I did this books are once again automatically added, however I lose the ability to edit or convert the books from the webui. So near and yet... so far Is it possible to do both of these things? |
01-04-2020, 12:53 PM | #9 |
Enthusiast
Posts: 26
Karma: 10
Join Date: Jun 2019
Device: Kindle
|
Sooooo, let me try and get this straight...
--enable-local-write allows me to send books to the calibre directory which calibredb then adds to the library (I need this for my automated book adding system to work) --enable-auth allows me to edit content via the Web UI (I need this to convert books that aren't compatible with my kindle) So if I understand it correctly these two functions are working in opposition to one another, with --enable-auth being the overriding function for security purposes. Therefore it isn't possible to have these two functions working alongside one another in a script. Does that sound about right? I guess my next question would be; Is there another way to achieve the same results from my headless Calibre server? ie the automated adding of books and the ability to edit/convert them from the web UI? |
01-04-2020, 02:18 PM | #10 |
Enthusiast
Posts: 26
Karma: 10
Join Date: Jun 2019
Device: Kindle
|
I'm sorry I forgot to mention this line in my crontab
*/15 * * * * calibredb add /home/craftyclown/Calibre/New/Rich -r --with library http://127.0.0.1:8082/#Rich |
01-04-2020, 02:29 PM | #11 |
Enthusiast
Posts: 26
Karma: 10
Join Date: Jun 2019
Device: Kindle
|
aaaaaaaand I know see where I was going wrong... I hadn't added a username and password to the calibredb add command
calibredb add /home/craftyclown/Calibre/New/Sonya -r --with-library http://127.0.0.1:8082/#Sonya --username ???? --password ???? whilst removing --enable-local-write from my service script is the winning combo and seems to allow everything I want to do. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre content-server doesn't seem to see new books | offby1 | Calibre | 7 | 05-05-2013 10:58 AM |
calibre-server: Doesn't server up newly added files | kaistian | Calibre | 5 | 03-17-2013 11:54 AM |
Adding books by titles rather than authors on calibre? | truewt | Calibre | 6 | 07-02-2011 05:14 PM |
calibre server -> stanza, incorrect titles | mshellberg | Calibre | 5 | 06-18-2010 11:02 AM |
360 titles from calibre server -> iPhone | ChrisZA | Calibre | 3 | 03-14-2009 03:08 AM |