View Single Post
Old 02-11-2023, 05:41 PM   #8056
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,005
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by ownedbycats View Post
I tried to set ''=>#pagecount to see if nulling out the column would allow Count Pages to re-populate it, but it didn't work.
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.
JimmXinu is offline   Reply With Quote