View Single Post
Old 03-02-2021, 01:30 AM   #2479
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by ownedbycats View Post
I wondered if the gpm might be messing things up? I just have "IF #fanficcat exists, THEN use this" but no "ELSE use an empty string" that would overwrite the existing subtitles.
Actually, I think you are thinking about this incorrectly. The template should always return the subtitle you want to use for a each book. If you don't want a subtitle it should return an empty string or nothing (have to check the code). The driver check if this is different to what is on the device and update if it is different. That includes removing an existing subtitle if the template says the book does not have one.

This is how all the metadata updating in the driver works. It compares the current library value (after applying plugboards or templates) with what is in the database on the device. Then it updates the database with the differences. And that includes clearing the metadata value in the database.

If you just want to set the subtitle for a few books, I would not use the driver for the subtitle. Disable the option in the driver. Then use the metadata update in the Kobo Utilities plugin. You can select the books you want to set the subtitle on, which will make the template simpler. But, this should work in the same way as the driver, just on the selected books and when you want to run it.
davidfor is offline   Reply With Quote