View Single Post
Old 01-03-2025, 09:35 AM   #1
d4em
Junior Member
d4em began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2025
Device: None
Update custom column value

I have this code:

Code:
book_ids = self.gui.library_view.get_selected_ids()
        db = self.gui.current_db.new_api

        for book_id in book_ids:
            book = db.format_abspath(book_id, "txt") # This method breaks thread-safe promise of API, fix later
            metadata = db.get_metadata(book_id)
I need to edit one of the columns for these books. I tried the add_custom_book_data(name, val_map, delete_first=False) method in the db class, but I do not know what datatype it wants when it asks for a val_map.

How do I change the value of a column?
d4em is offline   Reply With Quote