Quote:
Originally Posted by JimmXinu
Code:
## Literal strings can be set into custom columns using double quotes.
## Each metadata=>column mapping must be on a separate line and each
## needs to have one space at the start of each line.
You're using single quotes.
Except that setting an Integer type column to empty string doesn't clear it.
In the Calibre GUI, the same is true: if you erase the contents of an int column, it automagically resets back to the previous value when you try to save it. You have to set it to a space to clear it.
But setting an int column to " " (space) from the API throws an error from inside the Calibre code:
Code:
ValueError: invalid literal for int() with base 10: ' '
I'm not entirely sure what, if anything, should be done about that. 
|
Proposed FAQ entry item:
Quote:
How do I insert an empty value into a column using custom_column_settings?
Normally, to replace the contents of a column with an empty value, you would use " "=>#yourcolumn.
However, this results in an error and failure when done with an integer column. (Example: When disabling the "Always overwrite an existing value" option in the Count Pages plugin, you will want to empty out the value so FFF integration is able to update it.) In this case, use "None"=>#yourintcolumn.
|
Alternately, update the comment to mention the 'None' for ints