View Single Post
Old 08-25-2019, 06:47 PM   #1
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 1,220
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
Set a value to a custom column inside a plugin

Hi everyone.

I'm trying to set a value to a custom column, but got stuck.

Here is what I got:

Code:
mi = db.get_metadata(book_id)
mi.set_user_metadata(#percentage, progress)
But it doesn't work, because 'progress' just a integer.
According to the Manual, I should use:

Code:
set_user_metadata(field, metadata)
How is a 'metadata' represented? I've noticed is not just a value, but I can't figure out how to make it work.
thiago.eec is offline   Reply With Quote