01-30-2018, 10:30 AM | #1 |
Connoisseur
Posts: 91
Karma: 104
Join Date: Nov 2014
Device: Kindle
|
calibredb add questions
Hi,
I have two problems: a) calibredb.exe add --library-path=F:\TXT\books\Calibre_Cze "Dean Koontz - Collection.Poetry.The.Book.Of.Counted.Sorrows - 2003.epub" never finishes (never = few minutes) and does something to the .db. After killing the process, the ebook is in db, also copied into the tree. I tried to find similar problems here, never found any. The ebook should not be the problem, tried the different ones. From gui it works okay. b) Could it be possible to add something like '--fields' switch for immediate changing custom db fields on file add? Running latest calibre 3.16, on win7 64bit eng and being happy with it ;-) Thx, J. |
01-30-2018, 10:47 AM | #2 |
creator of calibre
Posts: 44,750
Karma: 24967300
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If you look at manual for calibredb you will see that you can specify several metadata fields using options sunch as --title, --author --identifier etc.
As for it getting stuck, I have no idea why that is, it certainly is not normal. |
01-30-2018, 11:02 AM | #3 | |
Connoisseur
Posts: 91
Karma: 104
Join Date: Nov 2014
Device: Kindle
|
Quote:
Regarding the "unending add" operation - is there any way how to pass debug option to calibredb or having db operations logged or something like that? I can see that .db is constantly updated, also some transaction file appears there. |
|
01-30-2018, 11:10 AM | #4 |
creator of calibre
Posts: 44,750
Karma: 24967300
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There's now ay a single add can cause the db to be continuously updated. Are you running some other calibre program accessing the db at the same time?
And no you cannot update custom field during an add, you should use calibredb set_metadata for that with the id printed by calibredb add (of course in your case since calibredb add is hanging you cannot do that). |
01-30-2018, 11:31 AM | #5 | |
Connoisseur
Posts: 91
Karma: 104
Join Date: Nov 2014
Device: Kindle
|
Quote:
Ok, so for now, I ran the command on 16:11. I can see calibre creating: Koontz Dean subdir on 16:11 2003 (62602) on 16:11 2003 - Koontz Dean.epub on 16:11 from that time I can hear harddrive sounds and I can see metadata.db and metadata.db-journal being constantly updated. No other calibre process is running, just calibredb.exe. Checked that in the task manager, there are also seen tens of thousands of read/writes. Right now, 7 minutes in running, I see 85MB of read data, 42MB of written data. The db has 24MB, ebook 100kB. After 10 minutes of running, I killed it. Also I have to note that this is 4-core XEON machine with nothing to do and 16GB of memory, so we're not running under stressed condition here, or swapping. HA! I ran procmon and it seems that it does something to .opf files in my library, tons of operations around them. Checked one of the changed .opfs, it seems that it somehow 'backups' the newly created custom metadata fields to them. So it means it's not unending, but extremely slow, also doing something 'automagically' without my consent. #metoo Last edited by jindroush; 01-30-2018 at 11:41 AM. |
|
01-30-2018, 01:10 PM | #6 |
creator of calibre
Posts: 44,750
Karma: 24967300
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Run
calibredb backup_metadata let it finish and after that adding should be fast. And I have no interest in adding another option to add myself, but I wont refuse a patch. |
01-30-2018, 03:08 PM | #7 |
Connoisseur
Posts: 91
Karma: 104
Join Date: Nov 2014
Device: Kindle
|
Yep, the metadata backup was the culprit behind this.
Maybe there could be a message or the different behavior, because the gui does not behave in that way. Thanks, J. |
01-31-2018, 01:10 AM | #8 |
creator of calibre
Posts: 44,750
Karma: 24967300
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The GUI does metadata backup in the background. There is no background for CLI tools. It isn't normally a problem, unless you have lots and lots of unbacked up book records.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Add Series to Title in CalibreDB? | phossler | Calibre | 4 | 01-27-2015 10:19 AM |
calibredb add - exclude formats? | perler | Library Management | 5 | 11-26-2014 04:21 PM |
calibredb add problem | jmwatte | Calibre | 6 | 10-17-2014 03:30 AM |
calibredb add metadata issue | vir_db | Library Management | 0 | 07-21-2014 08:12 AM |
calibredb add -- how to add additional metadata? | TuxGirl | Calibre | 16 | 12-29-2011 02:01 AM |