View Single Post
Old 08-26-2020, 05:53 PM   #1
RG9400
Junior Member
RG9400 began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jun 2018
Device: None
Add custom column via calibre server

I am trying to use a running calibreserver to create a custom column. I saw that there is an option to route commands to calibredb, so I ran an example query below

http://iport/cdb/cmd/add_custom_column

with this payload

Code:
{
    "label": "page_count",
    "name": "page_count",
    "datatype": "int"
}
This errors out with the below error

Code:
{
    "tb": "Traceback (most recent call last):\n  File \"site-packages\\calibre\\srv\\cdb.py\", line 58, in cdb_run\n  File \"site-packages\\calibre\\db\\cli\\cmd_add_custom_column.py\", line 19, in implementation\nNotImplementedError\n",
    "err": ""
}
The reason is that I think the command is actually set to say it is not implemented, even though it seems to work via calibredb directly (src: https://github.com/kovidgoyal/calibr..._column.py#L17)

Is there any reason that it raises the NotImplemented error? Can it be added if it is not already functional? The main goal would be to remove the need for my docker container to contain the calibredb binary and still be able to interact with a running server. End goal is to create a page count column if one does not already exist.
RG9400 is offline   Reply With Quote